This commit is contained in:
@@ -23,10 +23,13 @@ namespace AyaNova.Biz
|
||||
private static TimeSpan _oldCPUTime = TimeSpan.Zero;
|
||||
private static DateTime _lastSnapshot = DateTime.UtcNow;
|
||||
private static DateTime _lastRpsTime = DateTime.UtcNow;
|
||||
private static double _cpu = 0, _rps = 0;
|
||||
|
||||
private static double _cpu = 0;
|
||||
|
||||
#if(DEBUG)
|
||||
private static TimeSpan tsOneMinute = new TimeSpan(0, 0, 10);
|
||||
#else
|
||||
private static TimeSpan tsOneMinute = new TimeSpan(0, 1, 0);
|
||||
#endif
|
||||
private static TimeSpan tsOneHour = new TimeSpan(1, 0, 0);
|
||||
private static TimeSpan ts24Hours = new TimeSpan(24, 0, 0);
|
||||
|
||||
@@ -274,7 +277,10 @@ from generate_series(1, 525600) s(i)
|
||||
|
||||
|
||||
_lastSnapshot = now;
|
||||
|
||||
{
|
||||
DateTime ClearAfter = DateTime.UtcNow - tsDataRetention;
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from ametricmm where t > {ClearAfter}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ namespace AyaNova.Generator
|
||||
private readonly IServiceProvider provider;
|
||||
|
||||
#if(DEBUG)
|
||||
private const int GENERATE_SECONDS = 15;
|
||||
private const int GENERATE_SECONDS = 5;
|
||||
#else
|
||||
private const int GENERATE_SECONDS = 30;
|
||||
private const int GENERATE_SECONDS = 20;
|
||||
#endif
|
||||
|
||||
// public GeneratorService(ILogger<GeneratorService> logger, AyContext dbcontext, ApiServerState apiServerState)
|
||||
|
||||
Reference in New Issue
Block a user