Last active
August 8, 2016 04:27
-
-
Save kishan3/e91265b424a91c8a3c177fac0c7ccdde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Assuming you have already installed supervisor. | |
If not simply do: | |
sudo pip install supervisor | |
2. create a file under path : /etc/supervisor/conf.d/<filename.conf>/ | |
- sudo touch /etc/supervisor/conf.d/<filename.conf>/ | |
- content | |
[program:myworker] | |
command= /path/to/your/virtualenv/bin/rqworker | |
stdout_logfile = /var/log/redis_log/redis.log | |
numprocs=1 | |
directory=/path/to/your/django/project/directory/ | |
environment=DJANGO_SETTINGS_MODULE=config.local,PYTHONPATH=/path/to/your/django/project/directory/ | |
user = root | |
stopsignal=TERM | |
autostart=true | |
autorestart=true | |
[program:rqscheduler] | |
command= /path/to/your/virtualenv/bin/rqscheduler | |
stdout_logfile = /var/log/redis_log/rq_scheduler.log | |
numprocs=1 | |
directory=/path/to/your/django/project/directory/ | |
environment=DJANGO_SETTINGS_MODULE=config.local,PYTHONPATH=/path/to/your/django/project/directory/ | |
user = root | |
stopsignal=TERM | |
autostart=true | |
autorestart=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment