django fcgi - call a management command with subprocess.Popen
Posted
by user41855
on Server Fault
See other posts from Server Fault
or by user41855
Published on 2010-04-29T21:14:47Z
Indexed on
2010/04/29
21:17 UTC
Read the original article
Hit count: 348
Hi,
I'm using an app called django-chronograph. It has a code of line which works in my dev environment and does not work in production:
p = subprocess.Popen(['python', get_manage_py(), 'run_job', str(self.pk)])
This line crashes in production with: unknown command run_job Whereas when I run directly from command line: manage.py run_job It works fine.
Interestingly it worked once when we exchanged 'python' with 'usr/bin/python'. then we restarted the server once more and it was back to old behaviour.
Thus it seems as we have a python path issue. I'm not the guy who is running the server, its my app that should run and it would be great to get some help here. Attention: I'm a total noob regarding server-administration..
server environment: NGINX with FCGI-Daemon FCGI in prefork-mode
© Server Fault or respective owner