Merge "Drop before_first_request usage of Flask app"

This commit is contained in:
Zuul 2023-11-22 09:59:16 +00:00 committed by Gerrit Code Review
commit 85aadd6338

View File

@ -78,8 +78,10 @@ def _init_middleware():
def get_app():
"""Get the flask instance."""
_init_middleware()
return _app
with _app.app_context():
_init_middleware()
start_coordinator()
return _app
# TODO(kaifeng) Extract rpc related code into a rpcapi module
@ -196,7 +198,6 @@ def convert_exceptions(func):
return wrapper
@_app.before_first_request
def start_coordinator():
"""Create a coordinator instance for non-standalone case."""
if not CONF.standalone: