python-provy / provy

provy is a provisioning system in python.

Home Page:http://docs.provy.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gunicorn and Supervisord not working as intended

felipeota opened this issue · comments

I am using Ubuntu 12.04, Gunicorn 18.0 and Supervisor 3.0.

When using a Django role with Supervisor Provy generates a website-n script in init.d that calls gunicorn as follows:

$GUNICORN_DJANGO --name=...

The problem with this is that the bash script forks the gunicorn process and supervisord keeps waiting for the script instead of gunicorn, so when I shut down supervisord all the gunicorn workers are still up.

Changing it to something like

{% if not daemon %} exec {% endif %} $GUNICORN_DJANGO --name="...

does the trick.

Fixed in master. Will be released with the next version.