Daniel Peters
2014-03-12 19:44:39 UTC
Hello all.
I have a flask app, very simple, which when a specific url is hit with json
from a github webhook, a subprocess.call is made to a shell script in the
directory of the app
call(['sh', 'pull_new.sh'])
this call then pulls in the updated repo, brings down the flask app, and
brings it back up again. This app is also being run in a virtualenv.
For whatever reason, when I run the app from the commandline, in tmux, the
call to sub.call is made and the script does what its supposed to do, but
when the app is started under supervisord nothing at all happens. I've
checked the stdout, and stderror of the childprocess logs and nothing shows
up, even when I include other bits of code specifically to print to stdout.
I've also fiddled with many of the settings in supervisor.conf, things like
enviornment, directory, etc.
supervisord is sharing the virtualenv and is being run from the same
directory as the app, with its conf file also in the same directory. I've
removed system versions of flask and supervisor in an attempt to completely
isolate the virtualenv.
Any thoughts at all would be deeply appreciated. Thank you for your time.
I have a flask app, very simple, which when a specific url is hit with json
from a github webhook, a subprocess.call is made to a shell script in the
directory of the app
call(['sh', 'pull_new.sh'])
this call then pulls in the updated repo, brings down the flask app, and
brings it back up again. This app is also being run in a virtualenv.
For whatever reason, when I run the app from the commandline, in tmux, the
call to sub.call is made and the script does what its supposed to do, but
when the app is started under supervisord nothing at all happens. I've
checked the stdout, and stderror of the childprocess logs and nothing shows
up, even when I include other bits of code specifically to print to stdout.
I've also fiddled with many of the settings in supervisor.conf, things like
enviornment, directory, etc.
supervisord is sharing the virtualenv and is being run from the same
directory as the app, with its conf file also in the same directory. I've
removed system versions of flask and supervisor in an attempt to completely
isolate the virtualenv.
Any thoughts at all would be deeply appreciated. Thank you for your time.