Fix Exception terminating connection in Celery workers by disposing engine after each task

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/3960b056-8c90-407f-8024-c8abd2e479fb
This commit is contained in:
copilot-swe-agent[bot]
2026-03-25 22:52:14 +00:00
parent 43db7f4f66
commit fb9b3893c4
3 changed files with 17 additions and 3 deletions
+1
View File
@@ -16,6 +16,7 @@ Comprehensive task breakdown for repository improvements and production readines
- [ ] Enable rate limiting per user/tier
- [x] Fix bare exception handlers throughout codebase
- [x] Update datetime usage to timezone-aware (`DateTime(timezone=True)` columns and `lambda: datetime.now(timezone.utc)` defaults; fixes `DBAPIError` from asyncpg on timezone-naive columns)
- [x] Fix `Exception terminating connection` in Celery workers: call `await engine.dispose()` inside task coroutine so pooled asyncpg connections are closed before the event loop is torn down
- [ ] Validate redirect_uri to prevent open redirect vulnerabilities
- [ ] Add per-user random salt for encryption (currently deterministic)