From 71d6212ab8691ead0e89835729f89a55efd4c4aa Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Mon, 29 Jun 2026 03:25:46 -0400 Subject: [PATCH] fix(redis): use await asyncio.sleep() instead of time.sleep() in async generator (#25823) time.sleep() inside the _wrap_async_gen() async generator blocks the entire event loop during Sentinel failover retries. The sibling method _wrap_async_call() already correctly uses await asyncio.sleep(). --- backend/open_webui/utils/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/redis.py b/backend/open_webui/utils/redis.py index f2ac75410e..1417be134c 100644 --- a/backend/open_webui/utils/redis.py +++ b/backend/open_webui/utils/redis.py @@ -185,7 +185,7 @@ class SentinelRedisProxy: if proxy._should_retry(attempt): proxy._log_retry(exc, attempt) if REDIS_RECONNECT_DELAY: - time.sleep(REDIS_RECONNECT_DELAY / 1000) + await asyncio.sleep(REDIS_RECONNECT_DELAY / 1000) continue proxy._log_exhausted(exc) raise