ianbuss commented on code in PR #43817: URL: https://github.com/apache/airflow/pull/43817#discussion_r1834185890
########## airflow/api_fastapi/app.py: ########## @@ -28,6 +30,18 @@ app: FastAPI | None = None +@asynccontextmanager +async def lifespan(app: FastAPI): + async with AsyncExitStack() as stack: + for route in app.routes: + if isinstance(route, Mount) and isinstance(route.app, FastAPI): + await stack.enter_async_context( + route.app.router.lifespan_context(route.app), Review Comment: Possibly. I don't think so though as I didn't add one to core and the unit test didn't barf. But it might be a good addition anyway. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
