Browse Source

wsgi: Use meinheld worker (same as other Python Frameworks)

INADA Naoki 12 years ago
parent
commit
8932d0717b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      wsgi/setup.py

+ 3 - 2
wsgi/setup.py

@@ -5,7 +5,8 @@ import setup_util
 import os
 
 def start(args):
-  subprocess.Popen("gunicorn hello:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi")
+  subprocess.Popen('gunicorn hello:app --worker-class="egg:meinheld#gunicorn_worker" -b 0.0.0.0:8080 -w '
+                   + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="wsgi")
   return 0
 def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
@@ -18,4 +19,4 @@ def stop():
       except OSError:
         pass
 
-  return 0
+  return 0