forked from phoenix/litellm-mirror
(fix) ProxyStartup - Check that prisma connection is healthy when starting an instance of LiteLLM (#6627)
* fix debug statements * fix assert prisma_client.health_check is called on _setup * asser that _setup_prisma_client is called on startup proxy * fix prisma client health_check * add test_bad_database_url * add strict checks on db startup * temp remove fix to validate if check works as expected * add health_check back * test_proxy_server_prisma_setup_invalid_db
This commit is contained in:
parent
8a2b6fd8d2
commit
373f9d409e
4 changed files with 86 additions and 10 deletions
|
@ -3052,6 +3052,8 @@ class ProxyStartupEvent:
|
|||
prisma_client.check_view_exists()
|
||||
) # check if all necessary views exist. Don't block execution
|
||||
|
||||
# run a health check to ensure the DB is ready
|
||||
await prisma_client.health_check()
|
||||
return prisma_client
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue