feat(dal, core, workloadBuilderWorker): Сервисы по работе с очередями (задачиами). Заготовка WorkloadBuilderWorker
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user