This commit is contained in:
2021-06-07 18:17:06 +00:00
parent 59fd41d8d0
commit 7a73e6c78e
11 changed files with 109 additions and 30 deletions

View File

@@ -23,16 +23,12 @@ namespace AyaNova.Biz
private static DateTime lastRun = DateTime.MinValue;
// private static TimeSpan DELETE_AFTER_AGE = new TimeSpan(90, 0, 0, 0);
// private static TimeSpan RUN_EVERY_INTERVAL = new TimeSpan(0, 2, 0);//once every 2 minutes minimum
private static DateTime lastNotifyHealthCheckSentLocal = DateTime.MinValue;
private static TimeSpan TS_24_HOURS = new TimeSpan(24, 0, 0);//used to ensure daily ops happen no more than that
#if (DEBUG)
private static TimeSpan DELETE_AFTER_AGE = new TimeSpan(0, 12, 0, 0);
#if (DEBUG)
private static TimeSpan RUN_EVERY_INTERVAL = new TimeSpan(0, 0, 20);//no more frequently than once every 20 seconds
#else
private static TimeSpan DELETE_AFTER_AGE = new TimeSpan(90, 0, 0, 0);
#else
private static TimeSpan RUN_EVERY_INTERVAL = new TimeSpan(0, 2, 0);//no more frequently than once every 2 minutes
#endif

View File

@@ -37,7 +37,7 @@ namespace AyaNova.Generator
/*
todo: improve this
it should timeout: https://stackoverflow.com/questions/23476576/cancellationtoken-timeout-vs-task-delay-and-timeout
it should never stop running no matter what unless teh server shuts down
it should never stop running no matter what unless the server shuts down
*/
protected override async Task ExecuteAsync(CancellationToken stoppingToken)