Browse Source

Added gevent to installer

Patrick Falls 12 years ago
parent
commit
b538ca7d0d
3 changed files with 3 additions and 10 deletions
  1. 1 1
      django-optimized/setup.py
  2. 0 8
      django/setup.py
  3. 2 1
      installer.py

+ 1 - 1
django-optimized/setup.py

@@ -7,7 +7,7 @@ import os
 def start(args):
   setup_util.replace_text("django-optimized/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
 
-  subprocess.Popen("gunicorn hello.wsgi:application -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="django-optimized/hello")
+  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-optimized/hello")
   return 0
 def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 0 - 8
django/setup.py

@@ -5,14 +5,6 @@ import os
 
 def start(args):
   setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
-  # for the love of all that is good and right in the universe, use gevent worker
-  # if you're going to bother to use gunicorn.  meinheld is faster, but needs some work on 
-  # certain asynch support.
-  # $ easy_install pip
-  # $ pip install gevent
-  # not so difficult, is it?
-  # requires 5 minutes of searching
-  # so much for CTO Outsourcing
   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/hello")
   return 0
 def stop():

+ 2 - 1
installer.py

@@ -115,6 +115,7 @@ class Installer:
 
     self.__run_command("sudo easy_install -U 'gunicorn==0.17.2'")
     self.__run_command("sudo easy_install -U 'eventlet==0.12.1'")
+    self.__run_command("sudo pip install --upgrade 'gevent==0.13.8'")
 
     #
     # Resin
@@ -319,4 +320,4 @@ class Installer:
       pass
   ############################################################
   # End __init__
-  ############################################################
+  ############################################################