mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 02:02:13 -05:00
Merge pull request #1864 from GSA/try_gevent
try to force monkey patching to happen first
This commit is contained in:
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
from __future__ import print_function
|
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 flask import Flask # noqa
|
||||||
from werkzeug.serving import WSGIRequestHandler # noqa
|
from werkzeug.serving import WSGIRequestHandler # noqa
|
||||||
|
|
||||||
|
|||||||
5
gunicorn_entry.py
Normal file
5
gunicorn_entry.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from gevent import monkey
|
||||||
|
|
||||||
|
monkey.patch_all()
|
||||||
|
|
||||||
|
from application import application # noqa
|
||||||
@@ -4,4 +4,4 @@ if [[ $CF_INSTANCE_INDEX -eq 0 ]]; then
|
|||||||
flask db upgrade
|
flask db upgrade
|
||||||
fi
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user