refactor(fc2c-i): single shared async engine with lifecycle dispose
This commit is contained in:
@@ -21,4 +21,9 @@ def create_app() -> Quart:
|
||||
# Registered last so /api/* routes win over the SPA catch-all.
|
||||
app.register_blueprint(frontend_bp)
|
||||
|
||||
@app.after_serving
|
||||
async def _dispose_db_engine() -> None:
|
||||
from .extensions import dispose_engine
|
||||
await dispose_engine()
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user