Merge pull request #12090 from jmchilton/webapp_name

Rework variable name to clarify this is a wsgi application.
This commit is contained in:
Sergey Golitsynskiy
2021-06-03 16:32:40 -04:00
committed by GitHub
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ def add_galaxy_middleware(app: FastAPI, gx_app):
return response
def initialize_fast_app(gx_webapp, gx_app):
def initialize_fast_app(gx_wsgi_webapp, gx_app):
app = FastAPI(
title="Galaxy API",
docs_url="/api/docs",
@@ -97,6 +97,6 @@ def initialize_fast_app(gx_webapp, gx_app):
add_galaxy_middleware(app, gx_app)
add_request_id_middleware(app)
include_all_package_routers(app, 'galaxy.webapps.galaxy.api')
wsgi_handler = WSGIMiddleware(gx_webapp)
wsgi_handler = WSGIMiddleware(gx_wsgi_webapp)
app.mount('/', wsgi_handler)
return app
+2 -2
View File
@@ -60,5 +60,5 @@ def factory():
)
config_provider = WebappConfigResolver(props)
config = config_provider.resolve_config()
gx_webapp, gx_app = app_pair(global_conf=config.global_conf, load_app_kwds=config.load_app_kwds, wsgi_preflight=config.wsgi_preflight)
return initialize_fast_app(gx_webapp, gx_app)
gx_wsgi_webapp, gx_app = app_pair(global_conf=config.global_conf, load_app_kwds=config.load_app_kwds, wsgi_preflight=config.wsgi_preflight)
return initialize_fast_app(gx_wsgi_webapp, gx_app)
+2 -2
View File
@@ -856,7 +856,7 @@ def launch_uvicorn(webapp_factory, prefix=DEFAULT_CONFIG_PREFIX, galaxy_config=N
port = attempt_ports(port)
gx_app = build_galaxy_app(galaxy_config)
gx_webapp = webapp_factory(
gx_wsgi_webapp = webapp_factory(
galaxy_config['global_conf'],
app=gx_app,
use_translogger=False,
@@ -864,7 +864,7 @@ def launch_uvicorn(webapp_factory, prefix=DEFAULT_CONFIG_PREFIX, galaxy_config=N
register_shutdown_at_exit=False
)
from galaxy.webapps.galaxy.fast_app import initialize_fast_app
app = initialize_fast_app(gx_webapp, gx_app)
app = initialize_fast_app(gx_wsgi_webapp, gx_app)
server, port = uvicorn_serve(app, host=host, port=port)
set_and_wait_for_http_target(prefix, host, port)
log.info(f"Embedded uvicorn web server for {name} started at {host}:{port}")