forked from phoenix/litellm-mirror
add better debugging for get_redis_connection_pool + allow passing ssl=None
This commit is contained in:
parent
7d0e1f05ac
commit
163c6e1065
1 changed files with 2 additions and 1 deletions
|
@ -313,12 +313,13 @@ def get_redis_async_client(**env_overrides) -> async_redis.Redis:
|
|||
|
||||
def get_redis_connection_pool(**env_overrides):
|
||||
redis_kwargs = _get_redis_client_logic(**env_overrides)
|
||||
verbose_logger.debug("get_redis_connection_pool: redis_kwargs", redis_kwargs)
|
||||
if "url" in redis_kwargs and redis_kwargs["url"] is not None:
|
||||
return async_redis.BlockingConnectionPool.from_url(
|
||||
timeout=5, url=redis_kwargs["url"]
|
||||
)
|
||||
connection_class = async_redis.Connection
|
||||
if "ssl" in redis_kwargs and redis_kwargs["ssl"] is not None:
|
||||
if "ssl" in redis_kwargs:
|
||||
connection_class = async_redis.SSLConnection
|
||||
redis_kwargs.pop("ssl", None)
|
||||
redis_kwargs["connection_class"] = connection_class
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue