Closed jnns closed 3 years ago
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
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.
celery.task
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.
Fixed in #519
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:
Currently, django-imagekit tries to import
celery.task
which still works fine, but it doesn't do what it does previously.