Files
refusol-datalogging/backend/app
bonaminandClaude Opus 5.5 c725b748c7 fix(db): allow a request's SQLite connection to cross threads
FastAPI runs a sync dependency's setup, the endpoint and the teardown on
whichever threadpool worker is free, so a connection opened on one thread
was used/closed on another and sqlite3 raised ProgrammingError — 500s on
/api/power, /api/energy/daily and /api/summary under concurrent requests
(the dashboard fires three at once). Each request still gets its own
connection, used by one thread at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 09:55:48 +03:00
..