fix: retry on RuntimeError for stale Redis connections (Fixes HONCHO-18H)

uvloop raises RuntimeError when a TCP transport is closed and redis-py's
health check PING hits the stale connection. redis-py's default retry
logic doesn't cover RuntimeError, so it propagated unhandled. Adding
RuntimeError to retry_on_error causes redis-py to reconnect instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Erosika 2026-03-05 12:36:39 -05:00
parent f330cce386
commit 1fc8652564
1 changed files with 1 additions and 0 deletions

1
src/cache/client.py vendored
View File

@ -49,6 +49,7 @@ async def init_cache() -> None:
cache.setup(
settings.CACHE.URL,
pickle_type=PicklerType.SQLALCHEMY,
retry_on_error=[RuntimeError],
)
except Exception as setup_err: