feat(dal, core, workloadBuilderWorker): Сервисы по работе с очередями (задачиами). Заготовка WorkloadBuilderWorker

This commit is contained in:
Mikhail Trubnikov
2026-04-21 16:54:39 +10:00
parent 2a6fd7177d
commit 001c09edaa
22 changed files with 762 additions and 4 deletions

View File

@@ -3,8 +3,12 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PARR.Core.Common.Implementations;
using PARR.Core.Common.Interfaces;
using PARR.Core.Services.Task.Handlers;
using PARR.Core.Services.Task.Handlers.Factory;
using PARR.Core.Services.Task.Implementations;
using PARR.Core.Services.Task.Interfaces;
using PARR.Core.Services.Workload.Implementations;
using PARR.Core.Services.Workload.Interfaces;
using PARR.Domain.Settings;
namespace PARR.Core
@@ -37,13 +41,33 @@ namespace PARR.Core
#endregion
#region Services
#region Task
// Регистрация хендлеров (нужно регистировать каждый отдельно)
services.AddScoped<WorkloadReportHandler>();
services.AddScoped<BaseTaskHandler>(sp => sp.GetRequiredService<WorkloadReportHandler>());// регим для фабрики
// Еще хэндлеры...
// Фабрика хэндлеров
services.AddScoped<ITaskHandlerFactory, TaskHandlerFactory>();
services.AddScoped<ITaskManagementService, TaskManagementService>();
#endregion
#region Services
//services.AddScoped<IUserService, UserService>();
#endregion
#region IMessageConsumer services
services.AddSingleton<IWorkloadCacheBuilderService, WorkloadCacheBuilderService>();
#endregion
return services;
}