mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 20:20:55 +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:
co-authored by
Stan Triepels
parent
c3b49cca25
commit
dcfe5b6650
+5
-1
@@ -145,7 +145,11 @@ def save_task(task, broker: Broker):
|
|||||||
attempt_count=1,
|
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"])
|
broker.acknowledge(task["ack_id"])
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user