diff --git a/api-daemon/pvcapid/Daemon.py b/api-daemon/pvcapid/Daemon.py index d50541fa..6f43a39b 100755 --- a/api-daemon/pvcapid/Daemon.py +++ b/api-daemon/pvcapid/Daemon.py @@ -20,18 +20,19 @@ # ############################################################################### +from gevent import monkey +monkey.patch_all() + import gevent.pywsgi import pvcapid.flaskapi as pvc_api -from gevent import monkey ########################################################## # Entrypoint ########################################################## if pvc_api.config['debug']: # Run in Flask standard mode - pvc_api.app.run(pvc_api.config['listen_address'], pvc_api.config['listen_port']) + pvc_api.app.run(pvc_api.config['listen_address'], pvc_api.config['listen_port'], threaded=True) else: - monkey.patch_all() if pvc_api.config['ssl_enabled']: # Run the WSGI server with SSL http_server = gevent.pywsgi.WSGIServer(