case 4685 - backup schedule logged at Debug level when it changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
private static ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("CoreJobBackup");
|
private static ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("CoreJobBackup");
|
||||||
private static bool BackupIsRunning = false;
|
private static bool BackupIsRunning = false;
|
||||||
|
private static string LastLoggedBackupStatus = null;
|
||||||
private const int MAXIMUM_MS_ALLOWED_FOR_PROCESSING = 10 * 60 * 1000;//wild assed guess 10 minutes maximum to run backup command, ever
|
private const int MAXIMUM_MS_ALLOWED_FOR_PROCESSING = 10 * 60 * 1000;//wild assed guess 10 minutes maximum to run backup command, ever
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -30,11 +31,15 @@ namespace AyaNova.Biz
|
|||||||
if (!OnDemand)
|
if (!OnDemand)
|
||||||
{
|
{
|
||||||
log.LogTrace("Checking if backup should run");
|
log.LogTrace("Checking if backup should run");
|
||||||
if (!ServerGlobalOpsSettingsCache.Backup.Active)
|
//case 4685: the schedule at Debug level, logged once each time it changes instead of on every pass
|
||||||
|
var backupStatus = ServerGlobalOpsSettingsCache.BackupStatusText();
|
||||||
|
if (backupStatus != LastLoggedBackupStatus)
|
||||||
{
|
{
|
||||||
log.LogDebug("Automatic backup is set to INACTIVE - not backing up");
|
log.LogDebug(backupStatus);
|
||||||
return;
|
LastLoggedBackupStatus = backupStatus;
|
||||||
}
|
}
|
||||||
|
if (!ServerGlobalOpsSettingsCache.Backup.Active)
|
||||||
|
return;
|
||||||
|
|
||||||
if (DateTime.UtcNow < ServerGlobalOpsSettingsCache.NextBackup)
|
if (DateTime.UtcNow < ServerGlobalOpsSettingsCache.NextBackup)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user