Merge pull request #1864 from GSA/try_gevent

try to force monkey patching to happen first
This commit is contained in:
ccostino
2025-07-28 14:23:46 -04:00
committed by GitHub
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