try to force monkey patching to happen first

This commit is contained in:
Kenneth Kehl
2025-07-28 10:44:52 -07:00
parent b7d96225fb
commit 0a2d66796e
3 changed files with 6 additions and 6 deletions

View File

@@ -2,11 +2,6 @@
from __future__ import print_function
from gevent import monkey
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

5
gunicorn_entry.py Normal file
View File

@@ -0,0 +1,5 @@
from gevent import monkey
monkey.patch_all()
from application import application # noqa

View File

@@ -4,4 +4,4 @@ if [[ $CF_INSTANCE_INDEX -eq 0 ]]; then
flask db upgrade
fi
exec newrelic-admin run-program gunicorn -c ${HOME}/gunicorn_config.py application
exec newrelic-admin run-program gunicorn -c ${HOME}/gunicorn_config.py gunicorn_entry:application