mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge branch 'main' into litellm_admin_ui_view_all_keys
This commit is contained in:
commit
e36566a212
9 changed files with 96 additions and 30 deletions
|
@ -472,8 +472,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
|
||||
|
@ -896,6 +894,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:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue