This commit is contained in:
@@ -186,6 +186,14 @@ namespace AyaNova.Biz
|
||||
return;
|
||||
}
|
||||
|
||||
//Do not process if there is no db, everything relies on it below here
|
||||
if (!ServerGlobalOpsSettingsCache.DBAVAILABLE)
|
||||
{
|
||||
//This will set dbavailable flag if it becomes available
|
||||
DbUtil.CheckDatabaseServerAvailable();
|
||||
return;
|
||||
}
|
||||
|
||||
ActivelyProcessing = true;
|
||||
log.LogTrace("Processing internal jobs");
|
||||
try
|
||||
@@ -307,6 +315,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
var msg = "Server::ProcessJobsAsync unexpected error during processing";
|
||||
log.LogError(ex, msg);
|
||||
DbUtil.HandleIfDatabaseUnavailableTypeException(ex);
|
||||
await NotifyEventHelper.AddOpsProblemEvent(msg, ex);
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -395,6 +395,7 @@ namespace AyaNova.Biz
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.LogError(ex, $"Error adding general notify event [type:{eventType}, userId:{userId}, message:{message}]");
|
||||
DbUtil.HandleIfDatabaseUnavailableTypeException(ex);
|
||||
}
|
||||
|
||||
}//eom
|
||||
|
||||
@@ -5211,6 +5211,7 @@ namespace AyaNova.Biz
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.LogError(ex, $"error generating Work order from PM {p.Serial}");
|
||||
DbUtil.HandleIfDatabaseUnavailableTypeException(ex);
|
||||
await NotifyEventHelper.AddGeneralNotifyEvent(AyaType.PM, p.Id, NotifyEventType.PMGenerationFailed, $"Error generating Work order from PM {p.Serial}", "Preventive Maintenance", ex);
|
||||
if (!KeepOnWorking(log)) return;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user