fix: allow Redis blocking poll timeout

This commit is contained in:
hailt 2026-11-12 21:58:39 +07:00
parent 54de74d44c
commit ae20a58a43

View file

@ -27,7 +27,7 @@ def _redis_client():
try: try:
import redis.asyncio as aioredis import redis.asyncio as aioredis
_redis = aioredis.from_url(get_settings().redis_url, decode_responses=True, _redis = aioredis.from_url(get_settings().redis_url, decode_responses=True,
socket_connect_timeout=1, socket_timeout=1) socket_connect_timeout=1, socket_timeout=5)
except Exception as e: except Exception as e:
log.warning("redis unavailable, events fall back to direct insert: %s", e) log.warning("redis unavailable, events fall back to direct insert: %s", e)
_redis = None _redis = None