feat(api, Core, TaskReconciliationWorker): Воркер обработки зависших задач. Доработка логики.
This commit is contained in:
@@ -8,6 +8,7 @@ using PARR.Core.Services.Task.Handlers.Factory;
|
||||
using PARR.Core.Services.Task.Implementations;
|
||||
using PARR.Core.Services.Task.Interfaces;
|
||||
using PARR.Core.Services.Task.Providers;
|
||||
using PARR.Core.Services.Task.ReconciliationHosted;
|
||||
using PARR.Core.Services.Workload.Implementations;
|
||||
using PARR.Core.Services.Workload.Interfaces;
|
||||
using PARR.Domain.Enums;
|
||||
@@ -108,6 +109,30 @@ namespace PARR.Core
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Подключение сервисов для TaskReconciliation
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="configureSettings"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddTaskReconciliation(this IServiceCollection services, IReconciliationSettings reconciliationSettings)
|
||||
{
|
||||
if (reconciliationSettings == null)
|
||||
throw new ArgumentNullException(nameof(reconciliationSettings));
|
||||
|
||||
// Настройки
|
||||
services.AddSingleton(reconciliationSettings);
|
||||
|
||||
// Сервис
|
||||
services.AddScoped<ITaskReconciliationService, TaskReconciliationService>();
|
||||
|
||||
// Воркер
|
||||
services.AddHostedService<ReconciliationHostedService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
|
||||
private static IServiceCollection AddBllMapping(this IServiceCollection services)
|
||||
{
|
||||
// AutoMapper
|
||||
|
||||
Reference in New Issue
Block a user