Following this tutorial , I now have a Celery-Django application that works fine if I run this worker with this command: celery -A myapp worker -n worker1.% H
in my Django.py settings, I set all the parameters for Celery (IP message broker, etc.). Everything works well.
Now my next step is to run this application as Daemon. So I followed this second tutorial , and everything is simple, except that now the Celery options included in settings.py are not loading. For example, broker IP messages are set to 127.0.0.1, but in my settings.py I set it to a different IP address.
The textbook says:
make sure the module that defines the Celery application instance also sets the default value for DJANGO_SETTINGS_MODULE, as shown in the Django sample project in First Steps with Django .
Therefore, I was convinced. I have in / etc / default / celeryd this:
export DJANGO_SETTINGS_MODULE = "myapp.settings"
Still not working ... So I, too, this line in /etc/init.d/celeryd did not work again. I do not know what to do next. Does anyone have a key?
EDIT: Here is my celery.py:
from __future__ import absolute_import import os from django.conf import settings from celery import Celery
EDIT # 2: Here is my / etc / default / celeryd:
# Names of nodes to start
python django daemon celery
Zoubi
source share