Update con close iniziale calcoli completati
This commit is contained in:
@@ -224,7 +224,7 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
// Cancello hash delle statistiche aggregate
|
||||
tasks.Add(batch.KeyDeleteAsync(Key(aggKeyStr)));
|
||||
// Rimuovo dall’indice
|
||||
tasks.Add(batch.SetRemoveAsync(Key("stats:agg:index"), (RedisValue)$"{aggKeyStr}"));
|
||||
tasks.Add(batch.SetRemoveAsync(Key("stats:agg:index"), (RedisValue)$"{hourStr}"));
|
||||
|
||||
// Cancello hash delle richieste per la stessa ora
|
||||
tasks.Add(batch.KeyDeleteAsync(Key(reqKeyStr)));
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
try
|
||||
{
|
||||
reqPeriodMinute = _config.GetValue<int>("ServerConf:CleanupPeriodMinutes");
|
||||
clearProcessed = _config.GetValue<bool>("ServerConf:CleanupProcessed");
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -31,13 +32,15 @@ namespace EgwCoreLib.Lux.Data.Services
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
private bool clearProcessed = false;
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
await _calcRuidService.ExportStatsToDbAsync(false);
|
||||
await _calcRuidService.ExportStatsToDbAsync(clearProcessed);
|
||||
|
||||
// attesa tra le esecuzioni
|
||||
await Task.Delay(TimeSpan.FromMinutes(reqPeriodMinute), stoppingToken);
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
"FileSharePath": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\LuxUploads",
|
||||
"RedisBaseKey": "Lux",
|
||||
"CleanupPeriodMinutes": 30,
|
||||
"CleanupProcessed": true,
|
||||
"CleanupDayTTL": 180
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user