django-q icon indicating copy to clipboard operation
django-q copied to clipboard

How can I disable "retries" on failure?

Open igalci opened this issue 2 years ago • 1 comments

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...

igalci avatar Mar 07 '22 03:03 igalci

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
}

Waszker avatar Jun 15 '22 09:06 Waszker