mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(caching.py): fix async redis health check
This commit is contained in:
parent
0a99aa6434
commit
a79cb33960
3 changed files with 22 additions and 7 deletions
|
@ -248,9 +248,15 @@ class RedisCache(BaseCache):
|
|||
# asyncio.get_running_loop().create_task(self.ping())
|
||||
result = asyncio.get_running_loop().create_task(self.ping())
|
||||
except Exception as e:
|
||||
verbose_logger.error(
|
||||
"Error connecting to Async Redis client", extra={"error": str(e)}
|
||||
)
|
||||
if "no running event loop" in str(e):
|
||||
verbose_logger.debug(
|
||||
"Ignoring async redis ping. No running event loop."
|
||||
)
|
||||
else:
|
||||
verbose_logger.error(
|
||||
"Error connecting to Async Redis client - {}".format(str(e)),
|
||||
extra={"error": str(e)},
|
||||
)
|
||||
|
||||
### SYNC HEALTH PING ###
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue