Fix timeout parameter — accepted but never applied to HTTP requests #4

Closed
opened 2026-02-20 06:52:22 +00:00 by cal · 1 comment
Owner

Every function in db_calls.py (db_get, db_patch, db_post, db_put, db_delete, url_get) accepts a timeout parameter but never passes it to aiohttp. Callers throughout pass timeout=30, timeout=6, etc. believing values are in effect. If API hangs, script hangs indefinitely.

Fix: aiohttp.ClientTimeout(total=timeout).

Priority: high | Labels: bug, performance

Every function in `db_calls.py` (`db_get`, `db_patch`, `db_post`, `db_put`, `db_delete`, `url_get`) accepts a `timeout` parameter but never passes it to `aiohttp`. Callers throughout pass `timeout=30`, `timeout=6`, etc. believing values are in effect. If API hangs, script hangs indefinitely. Fix: `aiohttp.ClientTimeout(total=timeout)`. **Priority**: high | **Labels**: bug, performance
Claude added the
ai-working
label 2026-03-21 06:01:14 +00:00
Claude added
ai-pr-opened
and removed
ai-working
labels 2026-03-21 06:03:30 +00:00
Collaborator

PR opened: #41

Fix: Added aiohttp.ClientTimeout(total=timeout) to all six aiohttp.ClientSession() constructors in db_calls.py (db_get, url_get, db_patch, db_post, db_put, db_delete). Callers that pass timeout=30, timeout=6, etc. now have those values honoured at the HTTP layer.

PR opened: https://git.manticorum.com/cal/paper-dynasty-card-creation/pulls/41 **Fix:** Added `aiohttp.ClientTimeout(total=timeout)` to all six `aiohttp.ClientSession()` constructors in `db_calls.py` (`db_get`, `url_get`, `db_patch`, `db_post`, `db_put`, `db_delete`). Callers that pass `timeout=30`, `timeout=6`, etc. now have those values honoured at the HTTP layer.
cal closed this issue 2026-03-23 13:25:38 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-card-creation#4
No description provided.