diff --git a/lib/galaxy/webapps/galaxy/fast_app.py b/lib/galaxy/webapps/galaxy/fast_app.py index 27a55d477e6..de329ffe44e 100644 --- a/lib/galaxy/webapps/galaxy/fast_app.py +++ b/lib/galaxy/webapps/galaxy/fast_app.py @@ -31,8 +31,7 @@ def add_exception_handler( def initialize_fast_app(gx_app, app=None): - if app is None: - app = FastAPI() + app = FastAPI() add_exception_handler(app) wsgi_handler = WSGIMiddleware(gx_app) diff --git a/scripts/fapi.py b/scripts/fapi.py index c24d54e9bf7..1d94458bce5 100644 --- a/scripts/fapi.py +++ b/scripts/fapi.py @@ -1,5 +1,4 @@ import uvicorn -from fastapi import FastAPI from galaxy_main import ( GalaxyConfigBuilder, main, @@ -9,16 +8,13 @@ from galaxy.util.properties import load_app_properties from galaxy.webapps.galaxy.buildapp import app_factory from galaxy.webapps.galaxy.fast_app import initialize_fast_app -app = FastAPI() - def wsgiloop(args, log): config_builder = GalaxyConfigBuilder(args) kwds = config_builder.app_kwds() kwds = load_app_properties(**kwds) gx = app_factory(global_conf=config_builder.global_conf(), **kwds) - initialize_fast_app(gx, app=app) - uvicorn.run(app) + uvicorn.run(initialize_fast_app(gx)) if __name__ == '__main__':