From: stevenvanrossem Date: Sun, 23 Apr 2017 15:54:33 +0000 (+0200) Subject: use better web server module for rest api X-Git-Tag: v3.1~30^2~18 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=aefc46afef49c660984d2d62f62dd6df70a27a71;p=osm%2Fvim-emu.git use better web server module for rest api --- diff --git a/src/emuvim/api/rest/rest_api_endpoint.py b/src/emuvim/api/rest/rest_api_endpoint.py index f328b8e..0c9e1bc 100755 --- a/src/emuvim/api/rest/rest_api_endpoint.py +++ b/src/emuvim/api/rest/rest_api_endpoint.py @@ -30,7 +30,7 @@ import logging import threading from flask import Flask from flask_restful import Api -#from gevent.wsgi import WSGIServer +from gevent.wsgi import WSGIServer # need to import total module to set its global variable dcs import compute @@ -127,7 +127,7 @@ class RestApiEndpoint(object): logging.info("Started API endpoint @ http://%s:%d" % (self.ip, self.port)) def _start_flask(self): - self.app.run(self.ip, self.port, debug=True, use_reloader=False) + #self.app.run(self.ip, self.port, debug=True, use_reloader=False) #this should be a more production-fit http-server - #http_server = WSGIServer((self.ip, self.port), self.app) - #http_server.serve_forever() + http_server = WSGIServer((self.ip, self.port), self.app) + http_server.serve_forever()