This commit is contained in:
2021-12-24 22:57:45 +00:00
parent e703b440b2
commit 71fa9e5ef5
47 changed files with 145 additions and 109 deletions

View File

@@ -31,16 +31,16 @@ namespace AyaNova.Biz
public static async Task DoWorkAsync()
{
log.LogTrace("Checking if CoreJobPMInventoryCheck should run");
log.LogDebug("Checking if CoreJobPMInventoryCheck should run");
if (IsRunning)
{
log.LogTrace("CoreJobPMInventoryCheck is running already exiting this cycle");
log.LogDebug("CoreJobPMInventoryCheck is running already exiting this cycle");
return;
}
//This will get triggered roughly every minute, but we don't want to deliver that frequently
if (DateTime.UtcNow - lastRun < RUN_EVERY_INTERVAL)
{
log.LogTrace($"CoreJobPMInventoryCheck ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
log.LogDebug($"CoreJobPMInventoryCheck ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
return;
}
@@ -48,7 +48,7 @@ namespace AyaNova.Biz
try
{
IsRunning = true;
log.LogTrace("CoreJobPMInventoryCheck set to RUNNING state and starting now");
log.LogDebug("CoreJobPMInventoryCheck set to RUNNING state and starting now");
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
@@ -62,7 +62,7 @@ namespace AyaNova.Biz
}
finally
{
log.LogTrace("CoreJobPMInventoryCheck has completed; setting to not running state and tagging lastRun timestamp");
log.LogDebug("CoreJobPMInventoryCheck has completed; setting to not running state and tagging lastRun timestamp");
lastRun = DateTime.UtcNow;
IsRunning = false;
}