You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there a way to prevent Scheduled tasks from retrying in case of failure? I haved worked with Scheduled tasks for a while now and I observed the following behavior:
'max_attempts': 1, leads to Attempt count: 2, that is, two attempts were made to execute the task (same what my own application logs tell me), obviously the "1" is one retry attempt?
'max_attempts': 0, leads to unlimited attempts.
But there are use cases where I don't want a broken task to be executed again, because the chances are high that it will - without interference - break again and does some more unwanted stuff. I can imagine that this also applies to other users / applications?
The documentation says: Limit the number of retry attempts for failed tasks. Set to 0 for infinite retries. Defaults to 0
It is probably intentional, but - in my opinion - not stringent with the configuration of the scheduled tasks per se. If I configure a Scheduled task via admin interface, Repeats: -1 means unlimited repeats, Repeats: 0 should do nothing (if not used combined with Once) and Repeats: 1 does exactly one execution.
And I don't have the chance to tell the application in the configuration "try this just once and in case of error let it be".
Or do I missing something?
Thanks for your answer / help
stuhli
PS:
And thank all of you for your great work with improving Django Q!!!
The text was updated successfully, but these errors were encountered:
Hello,
is there a way to prevent Scheduled tasks from retrying in case of failure? I haved worked with Scheduled tasks for a while now and I observed the following behavior:
'max_attempts': 1,
leads toAttempt count: 2
, that is, two attempts were made to execute the task (same what my own application logs tell me), obviously the "1" is one retry attempt?'max_attempts': 0,
leads to unlimited attempts.But there are use cases where I don't want a broken task to be executed again, because the chances are high that it will - without interference - break again and does some more unwanted stuff. I can imagine that this also applies to other users / applications?
The documentation says:
Limit the number of retry attempts for failed tasks. Set to 0 for infinite retries. Defaults to 0
It is probably intentional, but - in my opinion - not stringent with the configuration of the scheduled tasks per se. If I configure a Scheduled task via admin interface,
Repeats: -1
means unlimited repeats,Repeats: 0
should do nothing (if not used combined with Once) andRepeats: 1
does exactly one execution.And I don't have the chance to tell the application in the configuration "try this just once and in case of error let it be".
Or do I missing something?
Thanks for your answer / help
stuhli
PS:
And thank all of you for your great work with improving Django Q!!!
The text was updated successfully, but these errors were encountered: