mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
Merge 7552b01b3f into b6dfa3799d
This commit is contained in:
commit
c91f995395
1 changed files with 3 additions and 1 deletions
|
|
@ -334,7 +334,9 @@ def get_redis_connection(
|
|||
)
|
||||
elif redis_url:
|
||||
factory = getattr(redis_mod, 'from_url', None) or redis_mod.Redis.from_url
|
||||
connection = factory(redis_url, decode_responses=decode_responses, **extra)
|
||||
# reconnect once when Redis has closed a pooled connection, e.g. after a restart
|
||||
retry = redis_mod.retry.Retry(_redis_sync.backoff.NoBackoff(), 1, supported_errors=(redis_mod.ConnectionError,))
|
||||
connection = factory(redis_url, decode_responses=decode_responses, retry=retry, **extra)
|
||||
|
||||
_CONNECTION_POOL[cache_key] = connection
|
||||
return connection
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue