mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-15 13:37:56 +08:00
Fix missing ack_id when finishing task (#224)
* Update monitor.py * format --------- Co-authored-by: Stan Triepels <1939656+GDay@users.noreply.github.com>
This commit is contained in:
@@ -145,7 +145,11 @@ def save_task(task, broker: Broker):
|
||||
attempt_count=1,
|
||||
)
|
||||
|
||||
if Conf.MAX_ATTEMPTS > 0 and task_obj.attempt_count >= Conf.MAX_ATTEMPTS:
|
||||
if (
|
||||
Conf.MAX_ATTEMPTS > 0
|
||||
and task_obj.attempt_count >= Conf.MAX_ATTEMPTS
|
||||
and task.get("ack_id")
|
||||
):
|
||||
broker.acknowledge(task["ack_id"])
|
||||
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user