1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

src/api/eosio_contract.go: do not return a message to haproxy if postgres is down.

This commit is contained in:
Henrik Hautakoski 2022-08-17 17:46:32 +02:00
parent ec705687bc
commit c8a128b657
No known key found for this signature in database
GPG key ID: 608414D93E862CCD

View file

@ -62,8 +62,7 @@ func (e EosioContract) Call() (agentcheck.Response, string) {
// Check postgres
if h.Data.Postgres.Status != "OK" {
resp := agentcheck.NewStatusMessageResponse(agentcheck.Down,
fmt.Sprintf("Postgres: %s", h.Data.Postgres.Status))
resp := agentcheck.NewStatusMessageResponse(agentcheck.Down, "")
msg := "Taking offline because Postgres reported '%s'"
return resp, fmt.Sprintf(msg, h.Data.Postgres.Status)