From 425e75d388beb3f00e527e89ef81a35fd5b6e931 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 13 Oct 2024 03:49:54 -0500 Subject: trigger start over http Signed-off-by: Jeff Carr --- poll.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'poll.go') diff --git a/poll.go b/poll.go index f7f2414..981bf86 100644 --- a/poll.go +++ b/poll.go @@ -136,8 +136,17 @@ func clusterHealthy() (bool, string) { } summary = strings.TrimSpace(summary) summary += ")" - summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")" + if me.killcount > 0 { + summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")" + } + last := time.Since(me.stable) + if last > 133*time.Second { + // the cluster has not been stable for 10 seconds + s := shell.FormatDuration(last) + summary += "(unstable " + s + ")" + } if good { + me.stable = time.Now() return good, "GOOD=true " + summary } return good, "GOOD=false " + summary -- cgit v1.2.3