mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-06-14 21:31:18 -04:00
68d9f241e1
- Fix lifespan function to access db_path from create_app scope via closure - Prevents "no such table: jobs" error by ensuring database initialization runs - Previous version tried to access app.state.db_path before it was set The issue was that app.state is set after FastAPI instantiation, but the lifespan function needs the db_path during startup. Using closure allows the lifespan function to capture db_path from the create_app function scope.