From b7d96225fbbdb98f4b5ee8706cf9ec6677082a89 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 28 Jul 2025 09:59:24 -0700 Subject: [PATCH] move monkey patching --- application.py | 12 ++++++++---- gunicorn_config.py | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) 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