mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Enhance health check logic to allow partial database failures without throwing an error, improving resilience in environments with multiple databases.
This commit is contained in:
parent
22c90ca7ad
commit
2dfa7d9542
1 changed files with 3 additions and 1 deletions
|
|
@ -136,7 +136,9 @@ App::get('/v1/health/db')
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($failures)) {
|
||||
// Only throw error if ALL databases failed (no successful pings)
|
||||
// This allows partial failures in environments where not all DBs are ready
|
||||
if (!empty($failures) && empty($output)) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue