[Answered ]-Django 1.6.5 with Celery 3.1 for Periodic Tasks

2👍

Here’s the steps for supervisor

>> apt-get install supervisor
>> service supervisor restart

Then create a conf file in /etc/supervisor/conf.d/celery.conf that contains something similar to:

[program:celery-worker]
command=/root/.virtualenvs/test/bin/celery -A Dashboard_Web worker -l INFO
autostart=true
autorestart=true
stderr_logfile=/var/log/long.err.log
stdout_logfile=/var/log/long.out.log

[program:celery-beat]
command=/root/.virtualenvs/test/bin/celery -A Dashboard_Web beat -l INFO
autostart=true
autorestart=true
stderr_logfile=/var/log/long.err.log
stdout_logfile=/var/log/long.out.log

You should also set up celery.py using this tutorial.

Then run:

>> supervisorctl reread
>> supervisorctl update

See the status by running

>> supervisorctl status

Leave a comment