Fix commento xu stop dati storici
This commit is contained in:
@@ -61,13 +61,13 @@ namespace MP.IOC.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
var deleteConfirmed = _config.GetValue<bool>("RouteMan:RecoverHistoricalMetrics", false);
|
||||
//var deleteConfirmed = _config.GetValue<bool>("RouteMan:RecoverHistoricalMetrics", false);
|
||||
|
||||
if (!deleteConfirmed)
|
||||
{
|
||||
Log.Debug("Historical metrics recovery disabled, skipping");
|
||||
return;
|
||||
}
|
||||
//if (!deleteConfirmed)
|
||||
//{
|
||||
// Log.Debug("Historical metrics recovery disabled, skipping");
|
||||
// return;
|
||||
//}
|
||||
|
||||
Log.Info("Starting historical metrics recovery from Redis...");
|
||||
|
||||
@@ -133,6 +133,8 @@ namespace MP.IOC.Services
|
||||
|
||||
if (recordsToInsert.Count > 0)
|
||||
{
|
||||
await using var scope = _scopeFactory.CreateAsyncScope();
|
||||
var _aggrService = scope.ServiceProvider.GetRequiredService<IStatsAggrService>();
|
||||
await _aggrService.UpsertManyAsync(recordsToInsert, false);
|
||||
Log.Info("[HISTORICAL] Recovered {count} hourly records for method {method}", recordsToInsert.Count, method);
|
||||
|
||||
@@ -189,6 +191,8 @@ namespace MP.IOC.Services
|
||||
|
||||
if (recordsToInsert.Count > 0)
|
||||
{
|
||||
await using var scope = _scopeFactory.CreateAsyncScope();
|
||||
var _detailService = scope.ServiceProvider.GetRequiredService<IStatsDetailService>();
|
||||
await _detailService.UpsertManyAsync(recordsToInsert, false);
|
||||
Log.Info("[HISTORICAL] Recovered {count} daily records for method {method}", recordsToInsert.Count, method);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user