Celery 5.x not supported: TypeError: 'module' object is not callable
jnns opened this issue · 3 comments
An API that has been deprecated since Celery 4.0.0 has been removed in Celery 5.0.0. The preferred way is this:
Quote from Celery 5 documentation:
How do I import the task decorator? And what’s “app”?
The task decorator is available on your Celery application instance, if you don’t know what this is then please read First Steps with Celery.
If you’re using Django (see First steps with Django), or you’re the author of a library then you probably want to use the shared_task() decorator:
from celery import shared_task @shared_task def add(x, y): return x + y
Currently, django-imagekit tries to import celery.task
which still works fine, but it doesn't do what it does previously.
Thank you for your report.
If you have time to prepare a PR I'll be very glad.
I've prepared a PR to add the support for celery 5.^ Could you please have a look when you have a chance.
#518