summaryrefslogtreecommitdiff
path: root/poll.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-28 11:44:53 -0500
committerJeff Carr <[email protected]>2024-10-28 11:44:53 -0500
commitc26699571d65178fe94390617d26055f8c1daf6f (patch)
treecf424079476e5e2fa491477fe545294df16277aa /poll.go
parent42d54a418d05192e2f19c443e4ac3c5594340a5e (diff)
ready to release a debian package?
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'poll.go')
-rw-r--r--poll.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/poll.go b/poll.go
index 6026b96..e82fe2e 100644
--- a/poll.go
+++ b/poll.go
@@ -194,15 +194,16 @@ func uptimeCheck() (bool, string) {
summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")"
}
last := time.Since(me.unstable)
+ s := strings.TrimSpace(shell.FormatDuration(last))
if last > me.clusterStableDuration {
// the cluster has not been stable for 10 seconds
- s := strings.TrimSpace(shell.FormatDuration(last))
summary += "(stable=" + s + ")"
+ } else {
+ summary += "(unstable=" + s + ")"
}
for _, d := range missing {
summary += fmt.Sprint("\nmissing droplet: ", d.Hostname, " current state ", d.CurrentState)
}
- summary += fmt.Sprint("\ngrid stable for: ", shell.FormatDuration(time.Since(me.unstable)))
if good {
return good, "GOOD=true " + summary
}