summaryrefslogtreecommitdiff
path: root/event.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-26 21:13:25 -0500
committerJeff Carr <[email protected]>2024-10-26 21:13:25 -0500
commit5d1729f99ba8968900eaaaa38f74f327730fffd4 (patch)
treed0fe2a24e443e14fe6ffcb28fd1937f8ec0ee0b0 /event.go
parentcec509ae7f3156887a807a50a3e8d6982a236435 (diff)
more cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'event.go')
-rw-r--r--event.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/event.go b/event.go
index 0705595..0b4549a 100644
--- a/event.go
+++ b/event.go
@@ -26,15 +26,13 @@ func (h *HyperT) RestartVirtigod() {
me.unstable = time.Now()
}
-var stableTimeout time.Duration = 43 * time.Second
-
// checks if the cluster is ready and stable
func clusterReady() (bool, string) {
last := time.Since(me.unstable)
- if last > stableTimeout {
+ if last > me.unstableTimeout {
// the cluster has not been stable for 133 seconds
- log.Warn("clusterReady() is stable for ", shell.FormatDuration(stableTimeout), " secs")
- return true, fmt.Sprintln("clusterReady() is stable ", shell.FormatDuration(stableTimeout), " secs")
+ log.Warn("clusterReady() is stable for ", shell.FormatDuration(me.unstableTimeout), " secs")
+ return true, fmt.Sprintln("clusterReady() is stable ", shell.FormatDuration(me.unstableTimeout), " secs")
}
log.Warn("clusterReady() is unstable for", shell.FormatDuration(last))
return false, "clusterReady() is unstable for " + shell.FormatDuration(last)