Running django custom management commands with supervisord

Posted by mfsaint on Server Fault See other posts from Server Fault or by mfsaint
Published on 2012-05-18T21:06:56Z Indexed on 2012/11/05 17:05 UTC
Read the original article Hit count: 472

Filed under:
|

I'd like to use supervisord to run some commands for my Django project but I keep getting the following error:

supervisor.log:

2012-05-18 17:52:15,784 INFO spawnerr: can't find command 'source'

If I remove the "source" command, the log shows the same error: can't find command 'python'.

supervisord.conf excerpt:

[program:django]
directory=/home/mf/projects/djangopj/
command=beanstalkd -l 127.0.0.1 -p 11300
command=source /home/mf/virtualenvs/env/bin/activate
command=python manage.py command1
command=python manage.py command2
user=mf
autostart=true
autorestart=true

I tried removing the directory and adding the absolute path to the commands but I kept getting the same error.

I run supervisord with the following command:

supervisord -c supervisord.conf -l supervisor.log

© Server Fault or respective owner

Related posts about django

Related posts about supervisord