Migrazione controller stats e CalcRuid (complessa...)
This commit is contained in:
+2
-14
@@ -139,8 +139,6 @@ builder.Services.AddSingleton<IConnectionMultiplexer>(redisConn);
|
||||
builder.Services.AddSingleton<IRedisService, RedisService>();
|
||||
builder.Services.AddSingleton<RedisSubscriptionManager>();
|
||||
|
||||
|
||||
|
||||
var connectionString = builder.Configuration.GetConnectionString("Lux.All") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
|
||||
// DataLayerContext (manca!)
|
||||
builder.Services.AddDbContextFactory<DataLayerContext>(options =>
|
||||
@@ -170,18 +168,8 @@ builder.Services.AddScoped<ExternalMessageProcessor>();
|
||||
builder.Services.AddHostedService<RedisSubscriberService>();
|
||||
|
||||
// init servizio gestone ReqIndex
|
||||
string cleanupDayTTL = configuration.GetValue<string>("ServerConf:CleanupDayTTL") ?? "360";
|
||||
string rBaseKey = configuration.GetValue<string>("ServerConf:RedisBaseKey") ?? "Lux";
|
||||
int dayTTL = 360;
|
||||
int archTTL = 2;
|
||||
int.TryParse(cleanupDayTTL, out dayTTL);
|
||||
builder.Services.AddSingleton(new CalcRuidService(
|
||||
configuration,
|
||||
redisConn,
|
||||
redisBaseKey: rBaseKey,
|
||||
retention: TimeSpan.FromDays(dayTTL),
|
||||
archivePeriod: TimeSpan.FromDays(archTTL)
|
||||
));
|
||||
builder.Services.AddScoped<CalcRuidService>();
|
||||
//builder.Services.AddSingleton(new CalcRuidService(configuration, redisConn));
|
||||
|
||||
builder.Services.AddHostedService<StatsCollectService>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user