Merged in hotfix/job_killer_log_fix (pull request #341)

fixed logging of job killer action

Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
Jakub Trllo 2019-10-31 18:30:59 +00:00 committed by Milan Kolar
commit 9d994dd7fc

View file

@ -101,13 +101,14 @@ class JobKiller(BaseAction):
# Update all the queried jobs, setting the status to failed.
for job in jobs:
try:
origin_status = job["status"]
job['status'] = 'failed'
session.commit()
self.log.debug((
'Changing Job ({}) status: {} -> failed'
).format(job['id'], job['status']))
).format(job['id'], origin_status))
except Exception:
self.log.warning.debug((
self.log.warning((
'Changing Job ({}) has failed'
).format(job['id']))