queue + local sqlite WIP

This commit is contained in:
Alex Bezdieniezhnykh
2024-12-17 18:46:33 +02:00
parent 626767469a
commit 5fa18aa514
47 changed files with 694 additions and 222 deletions
+19 -22
View File
@@ -5,20 +5,7 @@ namespace Azaion.Common;
public class Constants
{
public const string CONFIG_PATH = "config.json";
public const string DEFAULT_DLL_CACHE_DIR = "DllCache";
#region ApiConfig
public const string DEFAULT_API_URL = "https://api.azaion.com/";
public const int DEFAULT_API_RETRY_COUNT = 3;
public const int DEFAULT_API_TIMEOUT_SECONDS = 40;
public const string CLAIM_NAME_ID = "nameid";
public const string CLAIM_EMAIL = "unique_name";
public const string CLAIM_ROLE = "role";
#endregion ApiConfig
public const string SECURE_RESOURCE_CACHE = "SecureResourceCache";
#region DirectoriesConfig
@@ -44,12 +31,18 @@ public class Constants
new() { Id = 7, Name = "Накати", ShortName = "Накати" },
new() { Id = 8, Name = "Танк з захистом", ShortName = "Танк захист" },
new() { Id = 9, Name = "Дим", ShortName = "Дим" },
new() { Id = 10, Name = "Літак", ShortName = "Літак" }
new() { Id = 10, Name = "Літак", ShortName = "Літак" },
new() { Id = 11, Name = "Мотоцикл", ShortName = "Мото" }
];
public static readonly List<string> DefaultVideoFormats = ["mp4", "mov", "avi"];
public static readonly List<string> DefaultImageFormats = ["jpg", "jpeg", "png", "bmp"];
public static int DEFAULT_LEFT_PANEL_WIDTH = 250;
public static int DEFAULT_RIGHT_PANEL_WIDTH = 250;
public const string DEFAULT_ANNOTATIONS_DB_FILE = "annotations.db";
# endregion AnnotatorConfig
# region AIRecognitionConfig
@@ -62,13 +55,6 @@ public class Constants
# endregion AIRecognitionConfig
# region AnnotatorWindowConfig
public static int DEFAULT_LEFT_PANEL_WIDTH = 250;
public static int DEFAULT_RIGHT_PANEL_WIDTH = 250;
#endregion
#region Thumbnails
public static readonly Size DefaultThumbnailSize = new(240, 135);
@@ -98,4 +84,15 @@ public class Constants
return new TimeSpan(0, hours, minutes, seconds, milliseconds * 100);
}
#region Queue
public const string MQ_DIRECT_TYPE = "direct";
public const string MQ_ANNOTATIONS_QUEUE = "azaion-annotations";
public const string MQ_ANNOTATIONS_CONFIRM_QUEUE = "azaion-annotations-confirm";
public const string ANNOTATION_PRODUCER = "AnnotationsProducer";
public const string ANNOTATION_CONFIRM_PRODUCER = "AnnotationsConfirmProducer";
#endregion
}