feat(dal): TaskManagementService - создать задачу в БД и отправить в очередь
This commit is contained in:
@@ -11,6 +11,9 @@
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Промежуток времени, если робот не доступен, не считаем это ошибкой
|
||||
/// </summary>
|
||||
public TimeSpan InaccessibilityTime { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +1,22 @@
|
||||
using PARR.BLL.Contracts.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
|
||||
namespace PARR.API.Settings
|
||||
{
|
||||
public class MqSettings
|
||||
{
|
||||
public MqGenerateTemplates GenerateTemplates { get; set; } = new MqGenerateTemplates();
|
||||
public MqTemplateDistributor TemplateDistributor { get; set; } = new MqTemplateDistributor();
|
||||
public MqTemplateActivator TemplateActivator { get; set; } = new MqTemplateActivator();
|
||||
public MqSettingsBase GenerateTemplates { get; set; } = new();
|
||||
public MqSettingsBase TemplateDistributor { get; set; } = new();
|
||||
public MqSettingsBase TemplateActivator { get; set; } = new();
|
||||
public MqStatistics Statistics { get; set; } = new MqStatistics();
|
||||
public MqTemplatesMatcher TemplatesMatcher { get; set; } = new MqTemplatesMatcher();
|
||||
public MqTemplatesUpdater TemplatesUpdater { get; set; } = new MqTemplatesUpdater();
|
||||
public MqNextRun NextRun { get; set; } = new MqNextRun();
|
||||
}
|
||||
public MqSettingsBase TemplatesMatcher { get; set; } = new();
|
||||
public MqSettingsBase TemplatesUpdater { get; set; } = new();
|
||||
public MqSettingsBase NextRun { get; set; } = new();
|
||||
|
||||
public class MqGenerateTemplates : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class MqTemplateDistributor : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class MqTemplateActivator : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Настройки MQ для задач
|
||||
/// </summary>
|
||||
public Dictionary<TaskTypeEnum, MqSettingsBase> Tasks { get; set; } = new();
|
||||
}
|
||||
|
||||
public class MqStatistics
|
||||
@@ -54,30 +33,4 @@ namespace PARR.API.Settings
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class MqTemplatesMatcher : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class MqTemplatesUpdater : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class MqNextRun : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public ushort? PrefetchCount { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user