Skip to content

Commit 80e6da4

Browse files
introduce config env variable for requequeing for killedworker
1 parent c258a8d commit 80e6da4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cads_broker/dispatcher.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ def on_future_done(self, future: distributed.Future) -> None:
218218
exception = future.exception()
219219
error_message = "".join(traceback.format_exception(exception))
220220
error_reason = exception.__class__.__name__
221-
if error_reason == "distributed.scheduler.KilledWorker":
221+
if error_reason == "distributed.scheduler.KilledWorker" and os.getenv(
222+
"BROKER_REQUEUE_ON_KILLED_WORKER", False
223+
):
222224
logger.info("worker killed: re-queueing", job_id=future.key)
223225
db.requeue_request(request_uid=future.key, session=session)
224226
else:

0 commit comments

Comments
 (0)