|
@@ -3,6 +3,7 @@ import setup_util
|
|
import multiprocessing
|
|
import multiprocessing
|
|
import os
|
|
import os
|
|
|
|
|
|
|
|
+home = os.path.expanduser('~')
|
|
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
|
|
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin')
|
|
NCPU = multiprocessing.cpu_count()
|
|
NCPU = multiprocessing.cpu_count()
|
|
|
|
|
|
@@ -12,6 +13,7 @@ proc = None
|
|
def start(args):
|
|
def start(args):
|
|
global proc
|
|
global proc
|
|
setup_util.replace_text("django-stripped/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
|
|
setup_util.replace_text("django-stripped/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
|
|
|
|
+ setup_util.replace_text("django-stripped/hello/hello/settings.py", "\/home\/ubuntu", home)
|
|
proc = subprocess.Popen([
|
|
proc = subprocess.Popen([
|
|
bin_dir + "/gunicorn",
|
|
bin_dir + "/gunicorn",
|
|
"hello.wsgi:application",
|
|
"hello.wsgi:application",
|
|
@@ -27,5 +29,6 @@ def stop():
|
|
if proc is None:
|
|
if proc is None:
|
|
return 0
|
|
return 0
|
|
proc.terminate()
|
|
proc.terminate()
|
|
|
|
+ proc.wait()
|
|
proc = None
|
|
proc = None
|
|
return 0
|
|
return 0
|