diff options
| author | Jeff Carr <[email protected]> | 2024-10-13 03:49:54 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-13 03:49:54 -0500 |
| commit | 425e75d388beb3f00e527e89ef81a35fd5b6e931 (patch) | |
| tree | 1e844883e716a8ee2f55478443b523e3b21ae85b /poll.go | |
| parent | ffe754a96a68e7cf8905344073e3b1eedb78e94b (diff) | |
trigger start over http
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'poll.go')
| -rw-r--r-- | poll.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |
