django-q
django-q copied to clipboard
How can I disable "retries" on failure?
Setting max_attempts to 0 means it will have infinite retries, no?
I noticed there is"ack_failures" setting, but I didn't quite understand how it works.
When set to True, also acknowledge unsuccessful tasks. This causes failed tasks to be considered as successful deliveries, thereby removing them from the task queue.
What does this mean "considered successful"? I want to know the task failed i just don't want to retry it...
Disabling retries for failed tasks is done via the ack_failures
option.
Set it to true in your configuration:
Q_CLUSTER = {
...
"ack_failures": True, # do not restart failed tasks
}