Skip to content

Commit

Permalink
fix resubmit number
Browse files Browse the repository at this point in the history
  • Loading branch information
francesconazzaro committed Sep 6, 2024
1 parent 6797f64 commit dceb80c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cads_broker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def set_request_error_status(
session=session,
)
requeue = False
if requeue and request.request_metadata.get("resubmit", 0) < os.getenv(
if requeue and request.request_metadata.get("resubmit_number", 0) < os.getenv(
"BROKER_REQUEUE_LIMIT", 3
):
logger.info("worker killed: re-queueing", job_id=request_uid)
Expand Down Expand Up @@ -437,7 +437,7 @@ def sync_database(self, session: sa.orm.Session) -> None:
# FIXME: check if request status has changed
if os.getenv(
"BROKER_REQUEUE_ON_LOST_REQUESTS", True
) and request.request_metadata.get("resubmit", 0) < os.getenv(
) and request.request_metadata.get("resubmit_number", 0) < os.getenv(
"BROKER_REQUEUE_LIMIT", 3
):
logger.info(
Expand Down

0 comments on commit dceb80c

Please sign in to comment.