django-q
django-q copied to clipboard
How to disable retries?
I have already tried to set max_attempts=1
and tried 0 too and it is still retrying once before stopping.
All my failed tasks have "attempt = 2" as the number of attempts tried, even though max_attempts is 1.
Is this a bug? or am I doing it wrong?
As per the documentation, 0 retries is actually infinite. It would make more sense to make -1 as infinite and 0 as literally "don't retry"
As per the documentation, 0 retries is actually infinite. It would make more sense to make -1 as infinite and 0 as literally "don't retry"
Well I tried that just in case, but I am wondering why the 1
retries is not working
Agreed with the sentiment here. Setting max_attempts
to 0 should really have the system not attempt retries. Either None
or -1
should be the "infinite" case.
I am also having issues with max_attempt
. My assumption was that this would limit the number of retries issued (whether the task hit the retry
value or whether the task failed). It seems that this value only limits the number of retries issued based on whether the task failed.
If this is the case, then there needs to be an option to set retry
to None.
Any updates on this?