Open pythoneast opened 4 years ago
Can you provide more system and configuration details?
This is an issue I hit with django. For celery to work off of django's settings files, celery conf variables must be defined starting with CELERY_
and in all caps (or namespace arg should be edited). I believe Celery also knows what conf variables to expect and filters the longterm_scheduler_backend
variable out. This means we need to explicitly set the conf variable in the django apps celery file:
# celery.py
from django.conf import settings
...
app.config_from_object('django.conf:settings', namespace='CELERY')
app.conf.longterm_scheduler_backend = settings.CELERY_LONGTERM_SCHEDULER_BACKEND
When calling the command for the cronjob, you need to pass arguments for the django app, just as you would normally when invoking celery.
celery -A <django_app_name> longterm_scheduler
I have a trouble with using your library. I've added config for celery as mentioned in documentation:
app.conf.longterm_scheduler_backend = 'redis://redis:6739/1'
But got an error:
What am I doing wrong? Thank you in advance