From 13bfedb1a8f5161738711ad0a8c1582c8a56b9ca Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 15 Jan 2023 13:29:05 +1100 Subject: [PATCH] when init jobs fail and HandleJobs() has a catchall fail, then turn them into persistent danger popups --- pa_job_manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pa_job_manager.py b/pa_job_manager.py index 95dd2f1..19b960e 100644 --- a/pa_job_manager.py +++ b/pa_job_manager.py @@ -868,7 +868,9 @@ def RunJob(job): # okay, we finished a job, so check for any jobs that are dependant on this and run them... # session.close() if job.pa_job_state != "Completed": - FinishJob(job, "PA Job Manager - This is a catchall to close of a Job, this should never be seen and implies a job did not actually complete?", "Failed" ) + FinishJob(job=job, + last_log="PA Job Manager - This is a catchall to close of a Job, this should never be seen and implies a job did not actually complete?", + state="Failed", pa_job_state="Completed", level="danger", persistent=True, cant_close=False ) HandleJobs(False) return @@ -2390,7 +2392,9 @@ def InitialValidationChecks(): AddLogForJob(job, "ERROR: The metadata path in settings does not exist - Please fix now"); if not rbp_exists or not sp_exists or not ip_exists or not mp_exists: - FinishJob(job,"ERROR: Job manager EXITing until above errors are fixed by paths being created or settings being updated to valid paths", "Failed" ) + FinishJob(job=job, + last_log="ERROR: Job manager EXITing until errors are fixed by paths being created or settings being updated to valid paths", + state="Failed", pa_job_state="Completed", level="danger", persistent=True, cant_close=False ) exit(-1) ReloadMetadata(job)