From: zharkovstas Date: Sun, 19 May 2019 05:39:17 +0000 (+0500) Subject: Try fix errors X-Git-Url: https://git.xn--bdkaa.com/?a=commitdiff_plain;h=a5dd88e3ff7af166bffbb1164a2de032c5f07fe4;p=where-are-you.py.git Try fix errors --- diff --git a/app.py b/app.py index 00b55e7..6481ed0 100644 --- a/app.py +++ b/app.py @@ -384,8 +384,11 @@ def static_media(staticFile): def index(whatever): return static_file('index.html', "build") +application = bottle.default_app() +from paste import httpserver + if os.environ.get('APP_LOCATION') == 'heroku': - run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000))) + httpserver.serve(application, host='0.0.0.0', port=int(os.environ.get("PORT", 5000))) else: - run(host='localhost', port=8080, debug=True, server='paste') + httpserver.serve(application, host='localhost', port=8080, threadpool_workers=20, request_queue_size=20)