Only update the job_explanation on error if there wasn't already one

This commit is contained in:
Jeff Bradberry 2021-12-15 15:24:04 -05:00
parent 5fdfd4114a
commit de0561dcc2

View File

@ -1544,7 +1544,8 @@ class BaseTask(object):
rc = res.rc
if status in ('timeout', 'error'):
self.instance.job_explanation = f"Job terminated due to {status}"
job_explanation = f"Job terminated due to {status}"
self.instance.job_explanation = self.instance.job_explanation or job_explanation
if status == 'timeout':
status = 'failed'