Closed martingaldeca closed 3 years ago
It seems like Celery from 5.x upwards uses a global-ish variable, app
, to setup tasks:
https://docs.celeryproject.org/en/stable/getting-started/first-steps-with-celery.html#application
Do you have app
elsewhere in your Django application...? Wondering what the best way that third-party applications can get hold of this app
instance, or if there is another integration method altogether.
Hi!, I changed the variable name app
to celery_app
in my code, and checked that I'm not using it anywhere, but still failling.
For me, the solution was fix celery version to 4.4.7 and kombu to 4.6.11, and with this version it works fine.
I think you can use shared_task
if you don't have access to the application object?
I think you can use
shared_task
if you don't have access to the application object?
It is still failing, even with the shared_tasks
decorator
@lamby @martingaldeca IMHO it could be related with this: https://github.com/celery/celery/pull/6315
See also https://github.com/celery/celery/issues/6406
Just use shared_task
as a replacement for task
https://docs.celeryproject.org/en/stable/django/first-steps-with-django.html#using-the-shared-task-decorator
Fixed in https://github.com/lamby/django-slack/commit/3996517db688a390bccb159f17acebe791dc608c - thanks all.
Hi, I'm using this slack integration in my project. I have all dockerized, and the main application container works fine, but, I'm also using celery in the project, and with celery version 5.0.0 I see this error in logs in the worker containers: