mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-06 02:48:04 +00:00
fix(redis): use await asyncio.sleep() instead of time.sleep() in async generator
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().
This commit is contained in:
parent
b1d40f3409
commit
1ec691209a
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue