From d83f263dba99a68b886ed3ad881f96ad0352f22f Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Tue, 29 Nov 2022 15:48:05 +0100 Subject: [PATCH] Also stop jobs that ended with shadow exception. --- htcondor-clustercockpit-push.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htcondor-clustercockpit-push.py b/htcondor-clustercockpit-push.py index 12e2f06..d7a8ecd 100755 --- a/htcondor-clustercockpit-push.py +++ b/htcondor-clustercockpit-push.py @@ -373,7 +373,7 @@ class CondorSync: # # time as new end time. Otherwise CC refuses to end the job. # endtime = int(ccjob['startTime']) + 1 - jobstate_map = {4: "cancelled", 5: "completed", 9: "cancelled", + jobstate_map = {4: "cancelled", 5: "completed", 7: "failed", 9: "cancelled", 10: "stopped", 12: "stopped", 24: "failed"} jobstate = jobstate_map[job['TriggerEventTypeNumber']] @@ -415,8 +415,9 @@ class CondorSync: if event['TriggerEventTypeNumber'] == 1: # Execute self._ccStartJob(event) elif event['TriggerEventTypeNumber'] == 4 or event['TriggerEventTypeNumber'] == 5 or \ - event['TriggerEventTypeNumber'] == 9 or event['TriggerEventTypeNumber'] == 10 or \ - event['TriggerEventTypeNumber'] == 12 or event['TriggerEventTypeNumber'] == 24: + event['TriggerEventTypeNumber'] == 7 or event['TriggerEventTypeNumber'] == 9 or \ + event['TriggerEventTypeNumber'] == 10 or event['TriggerEventTypeNumber'] == 12 or \ + event['TriggerEventTypeNumber'] == 24: self._ccStopJob(event) def sync(self, limit=200, jobid=None, direction='both'):