diff options
| author | Jeff Carr <[email protected]> | 2024-11-18 20:22:12 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-18 20:22:12 -0600 |
| commit | afc7fedbe14d22b7090efc970a21686a050d0242 (patch) | |
| tree | 5d08116134f53cd5cf628c8dd0961d3efda03f2c /watchdog.go | |
| parent | b71fec22c8cc6c5b3be47bd782a7c807be75216c (diff) | |
someday this will workv0.0.7
Diffstat (limited to 'watchdog.go')
| -rw-r--r-- | watchdog.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/watchdog.go b/watchdog.go index c490143..9db2471 100644 --- a/watchdog.go +++ b/watchdog.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "os" "time" ) @@ -32,7 +33,12 @@ func NewWatchdog() { // log.Info("Watchdog() ticked", me.zookeeper, "Current time: ", t) s := updatePackages() // pingStatus() + me.failcount += 1 sendMachine(s) + + if me.failcount > 20 { + os.Exit(0) + } // h.pollHypervisor() // h.Scan() } |
