Merge branch 'main' into litellm_slack_langfuse_alerting

This commit is contained in:
Krish Dholakia 2024-02-06 15:48:52 -08:00 committed by GitHub
commit 9e9fb747ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 80 additions and 26 deletions

View file

@ -480,8 +480,6 @@ class PrismaClient:
reset_at: Optional[datetime] = None,
):
try:
print_verbose("PrismaClient: get_data")
response: Any = None
if token is not None or (table_name is not None and table_name == "key"):
# check if plain text or hash
@ -893,6 +891,21 @@ class PrismaClient:
)
raise e
async def health_check(self):
"""
Health check endpoint for the prisma client
"""
sql_query = """
SELECT 1
FROM "LiteLLM_VerificationToken"
LIMIT 1
"""
# Execute the raw query
# The asterisk before `user_id_list` unpacks the list into separate arguments
response = await self.db.query_raw(sql_query)
return response
class DBClient:
"""