setup_py3.py 430 B

123456789101112131415
  1. import subprocess
  2. def start(args, logfile, errfile):
  3. subprocess.Popen(
  4. "$PY3_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql",
  5. cwd="django", shell=True, stderr=errfile, stdout=logfile)
  6. return 0
  7. def stop(logfile, errfile):
  8. subprocess.call(
  9. "kill `cat gunicorn.pid`",
  10. cwd="django", shell=True, stderr=errfile, stdout=logfile)
  11. return 0