api: status as degraded

This commit is contained in:
41666 2022-11-23 16:03:29 -05:00
parent 7e98934fe0
commit 84409cd67a

View file

@ -67,7 +67,7 @@ async fn health(mut con: Connection<RedisPool>) -> serde_json::Value {
.unwrap_or_default(); .unwrap_or_default();
json!({ json!({
"status": "ok", "status": if ping == "PONG" && pc && ps4us && ps4eu { "ok" } else { "degraded" },
"redis": ping == "PONG", "redis": ping == "PONG",
"pc": if pc { "primary" } else { "backup/down" }, "pc": if pc { "primary" } else { "backup/down" },
"ps4us": if ps4us { "primary" } else { "backup/down" }, "ps4us": if ps4us { "primary" } else { "backup/down" },