feat: Слияние веток. Миграции для Tasks
This commit is contained in:
@@ -18,12 +18,15 @@ using PARR.DAL.Services.Implementation;
|
||||
using PARR.DAL.Services.Implementations;
|
||||
using PARR.DAL.Services.Implementations.Job;
|
||||
using PARR.DAL.Services.Implementations.Schedule;
|
||||
using PARR.DAL.Services.Implementations.TaskServices;
|
||||
using PARR.DAL.Services.Implementations.Unit;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.DAL.Services.Interfaces.Job;
|
||||
using PARR.DAL.Services.Interfaces.Schedule;
|
||||
using PARR.DAL.Services.Interfaces.TaskServices;
|
||||
using PARR.DAL.Services.Interfaces.Unit;
|
||||
using PARR.DAL.Settings;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace PARR.DAL
|
||||
{
|
||||
@@ -45,16 +48,24 @@ namespace PARR.DAL
|
||||
|
||||
#region Redis + cache services
|
||||
|
||||
services.AddSingleton<IConnectionMultiplexer>(sp =>
|
||||
{
|
||||
// IConnectionMultiplexer - для нативных операций Redis
|
||||
var connectionString = configuration.GetConnectionString("RedisConnection");
|
||||
return ConnectionMultiplexer.Connect(connectionString);
|
||||
});
|
||||
|
||||
services.AddStackExchangeRedisCache(opt =>
|
||||
{
|
||||
opt.Configuration = configuration.GetConnectionString("RedisConnection");
|
||||
});
|
||||
|
||||
|
||||
var groupedShortcodesCacheSettings = new GroupedShortcodesCacheSettings();
|
||||
configuration.GetSection(nameof(GroupedShortcodesCacheSettings)).Bind(groupedShortcodesCacheSettings);
|
||||
services.AddSingleton(groupedShortcodesCacheSettings);
|
||||
|
||||
services.AddTransient<IRedisCacheService, RedisCacheService>();
|
||||
services.AddSingleton<IRedisCacheService, RedisCacheService>();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -135,6 +146,13 @@ namespace PARR.DAL
|
||||
|
||||
#endregion
|
||||
|
||||
#region Task
|
||||
|
||||
services.AddTransient<ITaskErrorService, TaskErrorService>();
|
||||
services.AddTransient<ITaskService, TaskService>();
|
||||
|
||||
#endregion
|
||||
|
||||
//services.AddTransient<INextRunModifierService, NextRunModifierService>();
|
||||
|
||||
#region NextRun Services
|
||||
|
||||
Reference in New Issue
Block a user