refactor(fc2c-i): single shared async engine with lifecycle dispose

This commit is contained in:
2026-05-15 13:53:42 -04:00
parent 0a4eb0bdc0
commit fc33c23dd5
3 changed files with 82 additions and 8 deletions
+5
View File
@@ -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