6👍
✅
To ensure the app is loaded when Django starts, we need to import the Celery app we defined in myproject/init.py:
sudo nano myproject/__init__.py
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ['celery_app']
1👍
In my case, I had to add broker_url
to my Django app settings. One way to do this is to create an environment variable named CELERY_BROKER_URL
.
- [Django]-Django Rest Serializer returns empty
- [Django]-Permission classess decorator is ignored. "Authentication credentials were not provided" response
- [Django]-Django next page not working in login page
- [Django]-Running django with ASGI?
Source:stackexchange.com