|
@@ -1,10 +1,8 @@
|
|
import subprocess
|
|
import subprocess
|
|
import setup_util
|
|
import setup_util
|
|
-import multiprocessing
|
|
|
|
import os
|
|
import os
|
|
|
|
|
|
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
|
|
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
|
|
-NCPU = multiprocessing.cpu_count()
|
|
|
|
|
|
|
|
proc = None
|
|
proc = None
|
|
|
|
|
|
@@ -12,13 +10,8 @@ proc = None
|
|
def start(args, logfile, errfile):
|
|
def start(args, logfile, errfile):
|
|
global proc
|
|
global proc
|
|
setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
|
|
setup_util.replace_text("bottle/app.py", "DBHOSTNAME", args.database_host)
|
|
- proc = subprocess.Popen([
|
|
|
|
- bin_dir + "/gunicorn",
|
|
|
|
- "app:app",
|
|
|
|
- "-k", "meinheld.gmeinheld.MeinheldWorker",
|
|
|
|
- "-b", "0.0.0.0:8080",
|
|
|
|
- '-w', str(NCPU*3),
|
|
|
|
- "--log-level=critical"],
|
|
|
|
|
|
+ proc = subprocess.Popen(
|
|
|
|
+ [bin_dir + "/gunicorn", "-c", "gunicorn_conf.py", "app:app"],
|
|
cwd="bottle", stderr=errfile, stdout=logfile)
|
|
cwd="bottle", stderr=errfile, stdout=logfile)
|
|
return 0
|
|
return 0
|
|
|
|
|