Skip to content

Commit 60af895

Browse files
authored
[rqd] Change exitstatus for failed frames on docker that should be retried (#1692)
If a frame fails to be initialized because its container is not available, mark the job with a statuscode that will get it back to waiting to be retried automatically. ``` EXITSTATUS_FOR_FAILED_LAUNCH = 256 ```
1 parent 544d85a commit 60af895

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rqd/rqd/rqcore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,12 +1195,12 @@ def runDocker(self):
11951195
self.rqlog.write(msg, prependTimestamp=rqd.rqconstants.RQD_PREPEND_TIMESTAMP)
11961196
except InvalidFrameOsError as e:
11971197
# Frame container didn't get created
1198-
returncode = -1
1198+
returncode = rqd.rqconstants.EXITSTATUS_FOR_FAILED_LAUNCH
11991199
self.__writeHeader()
12001200
self.rqlog.write(str(e), prependTimestamp=rqd.rqconstants.RQD_PREPEND_TIMESTAMP)
12011201
# pylint: disable=broad-except
12021202
except Exception as e:
1203-
returncode = -1
1203+
returncode = rqd.rqconstants.EXITSTATUS_FOR_FAILED_LAUNCH
12041204
msg = "Failed to launch frame container"
12051205
logging.exception(msg)
12061206
self.rqlog.write("%s - %s" % (msg, e),

0 commit comments

Comments
 (0)