feat(api, Core, TaskReconciliationWorker): Воркер обработки зависших задач. Доработка логики.

This commit is contained in:
Mikhail Trubnikov
2026-04-23 16:08:16 +10:00
parent 7da2265d1c
commit e8086b3a7d
13 changed files with 275 additions and 6 deletions

View File

@@ -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