feat: Перенесены внешние сервисы в Infrastructure. Удалены лишние проекты.
This commit is contained in:
@@ -3,7 +3,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Core.Repositories.Interfaces.TaskRepositories;
|
||||
using PARR.DAL.Cache.Services.Base;
|
||||
using PARR.DAL.Configurations.DbSettings;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
@@ -12,7 +11,6 @@ using PARR.DAL.DomainServices.Interfaces;
|
||||
using PARR.DAL.DomainServices.Shortcodes;
|
||||
using PARR.DAL.DomainServices.UnitFilterService;
|
||||
using PARR.DAL.DomainServices.UnitFilterService.Models;
|
||||
using PARR.DAL.InfluxDbServices;
|
||||
using PARR.DAL.NextRunServices;
|
||||
using PARR.DAL.NextRunServices.Subservices;
|
||||
using PARR.DAL.Repositories.TaskRepositories;
|
||||
@@ -27,7 +25,6 @@ using PARR.DAL.Services.Interfaces.Schedule;
|
||||
using PARR.DAL.Services.Interfaces.Unit;
|
||||
using PARR.DAL.Settings;
|
||||
using PARR.DAL.TaskServices;
|
||||
using StackExchange.Redis;
|
||||
|
||||
namespace PARR.DAL
|
||||
{
|
||||
@@ -54,36 +51,36 @@ namespace PARR.DAL
|
||||
|
||||
#region Redis + cache services
|
||||
|
||||
services.AddSingleton<IConnectionMultiplexer>(sp =>
|
||||
{
|
||||
// IConnectionMultiplexer - для нативных операций Redis
|
||||
var connectionString = configuration.GetConnectionString("RedisConnection");
|
||||
return ConnectionMultiplexer.Connect(connectionString);
|
||||
});
|
||||
//services.AddSingleton<IConnectionMultiplexer>(sp =>
|
||||
//{
|
||||
// // IConnectionMultiplexer - для нативных операций Redis
|
||||
// var connectionString = configuration.GetConnectionString("RedisConnection");
|
||||
// return ConnectionMultiplexer.Connect(connectionString);
|
||||
//});
|
||||
|
||||
services.AddStackExchangeRedisCache(opt =>
|
||||
{
|
||||
opt.Configuration = configuration.GetConnectionString("RedisConnection");
|
||||
});
|
||||
//services.AddStackExchangeRedisCache(opt =>
|
||||
//{
|
||||
// opt.Configuration = configuration.GetConnectionString("RedisConnection");
|
||||
//});
|
||||
|
||||
|
||||
var groupedShortcodesCacheSettings = new GroupedShortcodesCacheSettings();
|
||||
configuration.GetSection(nameof(GroupedShortcodesCacheSettings)).Bind(groupedShortcodesCacheSettings);
|
||||
services.AddSingleton(groupedShortcodesCacheSettings);
|
||||
|
||||
services.AddSingleton<IRedisCacheService, RedisCacheService>();
|
||||
//services.AddSingleton<IRedisCacheService, RedisCacheService>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region InfluxDb
|
||||
//#region InfluxDb
|
||||
|
||||
var influxDbSettings = new InfluxDbSettings();
|
||||
configuration.GetSection(nameof(InfluxDbSettings)).Bind(influxDbSettings);
|
||||
services.AddSingleton(influxDbSettings);
|
||||
//var influxDbSettings = new InfluxDbSettings();
|
||||
//configuration.GetSection(nameof(InfluxDbSettings)).Bind(influxDbSettings);
|
||||
//services.AddSingleton(influxDbSettings);
|
||||
|
||||
services.AddTransient<IInfluxDbService, InfluxDbService>();
|
||||
//services.AddTransient<IInfluxDbService, InfluxDbService>();
|
||||
|
||||
#endregion
|
||||
//#endregion
|
||||
|
||||
|
||||
// Entity services
|
||||
|
||||
Reference in New Issue
Block a user