diff --git a/application.py b/application.py index 38d267c14..875f2aab4 100644 --- a/application.py +++ b/application.py @@ -1,12 +1,16 @@ ##!/usr/bin/env python - from __future__ import print_function -from flask import Flask -from werkzeug.serving import WSGIRequestHandler +from gevent import monkey -from app import create_app, socketio # noqa: F401 +monkey.patch_all() # this has to be called before other imports or monkey patching doesn't happen + + +from flask import Flask # noqa +from werkzeug.serving import WSGIRequestHandler # noqa + +from app import create_app, socketio # noqa WSGIRequestHandler.version_string = lambda self: "SecureServer" diff --git a/gunicorn_config.py b/gunicorn_config.py index f3fcc1b4d..fc50f4ffc 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -1,7 +1,3 @@ -from gevent import monkey - -monkey.patch_all() # this has to be called before other imports or monkey patching doesn't happen - import os # noqa import socket # noqa import sys # noqa