Browse Source

Using meinheld gunicorn worker for python tests

Patrick Falls 12 years ago
parent
commit
07c6a10600
3 changed files with 3 additions and 3 deletions
  1. 1 1
      bottle/setup.py
  2. 1 1
      django-stripped/setup.py
  3. 1 1
      flask/setup.py

+ 1 - 1
bottle/setup.py

@@ -5,7 +5,7 @@ import os
 
 def start(args):
   setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
-  subprocess.Popen("gunicorn app:app -k gevent -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --preload --log-level=critical", shell=True, cwd="bottle")
+  subprocess.Popen("gunicorn app:app --worker-class=\"egg:meinheld#gunicorn_worker\" -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --preload --log-level=critical", shell=True, cwd="bottle")
   
   return 0
 

+ 1 - 1
django-stripped/setup.py

@@ -7,7 +7,7 @@ import os
 def start(args):
   setup_util.replace_text("django-stripped/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
 
-  subprocess.Popen("gunicorn hello.wsgi:application -k gevent -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="django-stripped/hello")
+  subprocess.Popen("gunicorn hello.wsgi:application --worker-class=\"egg:meinheld#gunicorn_worker\" -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="django-stripped/hello")
   return 0
 def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 1 - 1
flask/setup.py

@@ -5,7 +5,7 @@ import os
 
 def start(args):
   setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
-  subprocess.Popen("gunicorn app:app -k gevent -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --preload --log-level=critical", shell=True, cwd="flask")
+  subprocess.Popen("gunicorn app:app --worker-class=\"egg:meinheld#gunicorn_worker\" -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --preload --log-level=critical", shell=True, cwd="flask")
   
   return 0