3👍
✅
The problem was that i missed celery in __init__.py
. __init__.py
should contain following ( from the docs ):
from __future__ import absolute_import
# 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
2👍
Ensure the broker url on you config or settings file has the specified prefix as on the namespace app.config_from_object('django.conf:settings', namespace='CELERY')
so changed my BROKER_URL
to CELERY_BROKER_URL
- [Django]-How long does it take for a Djoser access token until expire?
- [Django]-"Unsafe redirect to URL with protocol 'content-type'" error in Django view
- [Django]-Django jsonfields ValidationError: [u'Enter valid JSON'] upon upgrade from 1.7 to 1.9
0👍
In my case the wrong broker issue was due to incorrect celery start command.
I’ve used ‘celery beat -A=myapp’, and broker was incorrect. Then i changed it to ‘celery -A myapp beat’ and it used correct broker from settings.
👤Tosh
- [Django]-Django APIClient Post Empty
- [Django]-Sorl thumbnail + django issues in production
- [Django]-Attach permissions and groups to custom User model created from BaseUserAdmin
- [Django]-Pass field value to custom layout.Field
0👍
It may cuased by kombu.
at first my env were:
kombu-4.6.11
celery-4.4.7
celery could not get settings by config_from_object !
after changed to:
kombu-4.0.2
celery-4.0.2
problem solved!
Source:stackexchange.com