When forecast_covers_range or forecast_revenue_for_date throw DB exceptions, the swallowed exception leaves the async session in an aborted transaction state. Subsequent queries (DOW averages, per-date accom) then fail with InFailedSQLTransactionError. Adding db.rollback() in the except blocks resets the session so the fallback path can continue cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| jobs | ||
| services | ||
| utils | ||
| auth.py | ||
| database.py | ||
| Dockerfile | ||
| main.py | ||
| requirements.txt | ||
| scheduler.py | ||
| schema.sql | ||