Skip to content

Commit

Permalink
add better debugging for get_redis_connection_pool + allow passing ss…
Browse files Browse the repository at this point in the history
…l=None
  • Loading branch information
ishaan-jaff committed Nov 26, 2024
1 parent 7d0e1f0 commit 163c6e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litellm/_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 163c6e1

Please sign in to comment.