-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a warning for misconfiguration. #509
Conversation
As specified in the docs, by default the settings result in a configuration where slow tasks that run for more than 60s cause repeated running of tasks, which has caused a few issues. This warning doesn't change the defaults, which would be a marge larger change, but instead provides a, hopefully, helpful message to the user.
fixed spelling
Made bool work for python 3.6+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing that. After fixing typo, I will merge and put it in the next release
Just came here to let you know that this warning is also raised with the default configuration (timeout=None, retry=60), which works perfectly fine with redis, even with long running tasks. |
I didn't spot that earlier. I guess we can take out the check for TIMEOUT to be not None. |
I haven’t tested this with a redis backend but from the docs it implies that timeout = None would lead to never timing out for all backends and then this problem should persist. If it doesn’t, maybe exclude redis and other backends where this issue doesn’t occur.
Yes the default leads to problems with long running tasks, thus the warning also in default. Can you confirm that a task that takes longer than 60 seconds does not get called repeatedly with a redis backend? |
I can confirm that even with 'retry=1', no long running tasks get repeated at all. As expected, since the documentation states this option won't have any effect with brokers that don't support delivery receipts, and redis is one of those. Also, the system check framework would probably be a much better tool to implement checks like this one. |
Just checked the docs and as far as I can see only Redis doesn't support delivery receipts. I guess the nicest way to do this would be to check for the attribute / function that is used for delivery receipts, else a list of brokers could be fine and the assumption that if you are using a custom broker you know what you are doing. |
I get this warning as well with the latest version. I'm setting |
@markopy What backend are you using? |
@icfly2 I use the orm backend in this case. I think for my case the issue is also that (aside from setting I have resolved this issue by simply setting timeout and retry to very large numbers. I think the documentation and default settings are misleading here. |
As specified in the docs, by default the settings result in a configuration where slow tasks that run for more than 60s cause repeated running of tasks, which has caused a few issues. This warning doesn't change the defaults, which would be a marge larger change, but instead provides a, hopefully, helpful message to the user.
This has caused issues before: #183 and others.
And it confused me, and only careful reading of the docs reveals this.