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
methods as tasks fail with CELERY_ALWAYS_EAGER=True #1478
Comments
Reporting occurrence of the same issue. On a normal request, running celery with CELERY_ALWAYS_EAGER=False it works perfectly, however, when I run tasks in tests (with CELERY_ALWAYS_EAGER=True), it passes the class (method's owner) as a parameter to the method apart from passing it to the self argument (it adds an extra arg). |
I won't be able to test because now all my tasks are regular tasks, for production-ready reasons I needed to make tests work. Next time I need to develop tasks i will retry using tasks as methods :-) But that's very good news !! Thanks a lot for this patch. |
Same case here, we resorted to a normal function task that calls the class method, this way it works fine. Next time we'll try it. Thanks a lot! |
The task methods are very experimental so I would expect you to find more bugs :) |
Hi,
I've got this stacktrace when I run tests of my webapp:
In my tests, I have:
The crash doesn't happen in "normal" conditions: if I remove the settings override, the
post_save_task()
runs without problem, but not in the right database (obviously because of production broker, different mongoengine connection, etc).The task-related code:
Any hint/advise ?
The text was updated successfully, but these errors were encountered: