|
@@ -5,7 +5,7 @@ import os
|
|
|
|
|
|
def start(args):
|
|
def start(args):
|
|
setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
|
|
setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
|
|
- subprocess.Popen("gunicorn app:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="flask")
|
|
|
|
|
|
+ subprocess.Popen("gunicorn app:app -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --worker-class=gevent --preload=True --log-level=critical", shell=True, cwd="flask")
|
|
|
|
|
|
return 0
|
|
return 0
|
|
|
|
|
|
@@ -20,4 +20,4 @@ def stop():
|
|
except OSError:
|
|
except OSError:
|
|
pass
|
|
pass
|
|
|
|
|
|
- return 0
|
|
|
|
|
|
+ return 0
|