diff options
| author | Jeff Carr <[email protected]> | 2024-10-13 04:34:55 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-13 04:34:55 -0500 |
| commit | ccbdef1a1340571110d9867499b0801ff19c681c (patch) | |
| tree | 1890cab5e70268ddf23eb896120cd28cd352bebc /poll.go | |
| parent | 425e75d388beb3f00e527e89ef81a35fd5b6e931 (diff) | |
checking for the grid to be 'stable' before starting new droplets
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'poll.go')
| -rw-r--r-- | poll.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -139,15 +139,15 @@ func clusterHealthy() (bool, string) { if me.killcount > 0 { summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")" } - last := time.Since(me.stable) + last := time.Since(me.unstable) if last > 133*time.Second { // the cluster has not been stable for 10 seconds - s := shell.FormatDuration(last) - summary += "(unstable " + s + ")" + s := strings.TrimSpace(shell.FormatDuration(last)) + summary += "(stable=" + s + ")" } if good { - me.stable = time.Now() return good, "GOOD=true " + summary } + me.unstable = time.Now() return good, "GOOD=false " + summary } |
