This commit is contained in:
2020-12-22 20:33:48 +00:00
parent 18df3ab55e
commit 3c5585b2ec
28 changed files with 301 additions and 199 deletions

View File

@@ -88,7 +88,7 @@ namespace AyaNova.Biz
var msg = $"Error during data backup \"{Result}\"";
await JobsBiz.LogJobAsync(Guid.Empty, msg);
log.LogError($"BACKUP ERROR: {Result}");
await NotifyEventProcessor.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, msg,"Backup");
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, msg,"Backup");
}
//DO FILE BACKUP IF ATTACHMENTS BACKED UP
@@ -110,14 +110,14 @@ namespace AyaNova.Biz
log.LogDebug("Backup completed");
var duration=DateTime.Now - dtStartBackup;
await NotifyEventProcessor.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, $"Backup ({(OnDemand ? "manual / on demand" : "scheduled")}) completed successfully, duration (h:m:s.ms): {duration.ToString()}, server re-opened","Backup");
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, $"Backup ({(OnDemand ? "manual / on demand" : "scheduled")}) completed successfully, duration (h:m:s.ms): {duration.ToString()}, server re-opened","Backup");
}
catch (Exception ex)
{
await JobsBiz.LogJobAsync(Guid.Empty, "LT:JobFailed");
await JobsBiz.LogJobAsync(Guid.Empty, ExceptionUtil.ExtractAllExceptionMessages(ex));
log.LogError(ex, "Backup failed");
await NotifyEventProcessor.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, "Backup failed","Backup", ex);
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, "Backup failed","Backup", ex);
throw;
}
finally