try to force gevent monkey patching earlier

This commit is contained in:
Kenneth Kehl
2025-07-28 11:17:00 -07:00
parent 6f663c83eb
commit 99585ae9f0
6 changed files with 12 additions and 11 deletions

View File

@@ -1,11 +1,7 @@
from gevent import monkey
from flask import Flask
from werkzeug.serving import WSGIRequestHandler
monkey.patch_all()
from flask import Flask # noqa
from werkzeug.serving import WSGIRequestHandler # noqa
from app import create_app # noqa
from app import create_app
WSGIRequestHandler.version_string = lambda self: "SecureServer"

View File

@@ -1,7 +1,7 @@
env: demo
instances: 1
memory: 1G
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py application
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py gunicorn_entry:application
public_admin_route: notify-demo.app.cloud.gov
cloud_dot_gov_route: notify-demo.app.cloud.gov
redis_enabled: 1

View File

@@ -1,7 +1,7 @@
env: production
instances: 2
memory: 2G
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py application
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py gunicorn_entry:application
public_admin_route: beta.notify.gov
cloud_dot_gov_route: notify.app.cloud.gov
redis_enabled: 1

View File

@@ -1,7 +1,7 @@
env: sandbox
instances: 1
memory: 1G
command: gunicorn -c /home/vcap/app/gunicorn_config.py application
command: gunicorn -c /home/vcap/app/gunicorn_config.py gunicorn_entry:application
public_admin_route: notify-sandbox.app.cloud.gov
cloud_dot_gov_route: notify-sandbox.app.cloud.gov
redis_enabled: 1

View File

@@ -1,7 +1,7 @@
env: staging
instances: 1
memory: 1G
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py application
command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py gunicorn_entry:application
public_admin_route: notify-staging.app.cloud.gov
cloud_dot_gov_route: notify-staging.app.cloud.gov
redis_enabled: 1

5
gunicorn_entry.py Normal file
View File

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