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:
parent
f330cce386
commit
1fc8652564
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue