I am trying to daemonize celery and celerybeat. I have downloaded the celeryd and celeybeat files from github and placed them in /etc/init.d/
(celery and celerybeat) with the corresponding config files under /etc/default/
.
My problem is that when I run these two files, celeryd and celerybeat use system python (2.4), and as a result cannot find other installed applications under python 2.7. Python 2.7 is in ~/.bashrc
and /.bash_profile
files, so I do not have any problems running other applications, except when workers fail to work. When I run python ...../manage.py celery
( with all options) everything works like a charm.
Please let me know how I can force /init.d/function
to run python2.7.
I have tried to implement #! /bin/sh python
, but it does not work.