setup.py 412 B

12345678910111213141516171819
  1. import subprocess
  2. import setup_util
  3. proc = None
  4. def start(args):
  5. proc = subprocess.Popen(
  6. "gunicorn hello:app -k meinheld.gmeinheld.MeinheldWorker -b 0.0.0.0:8080 -w " +
  7. str((args.max_threads * 2)) + " --preload --log-level=critical", shell=True, cwd="wsgi")
  8. return 0
  9. def stop():
  10. global proc
  11. if proc is None:
  12. return 0
  13. proc.terminate()
  14. proc = None
  15. return 0