From ac5da98149aedb2b315e6ca66403e6b437d59efb Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 04:56:06 -0500 Subject: notsure --- main.go | 2 -- watchdog.go | 18 +++++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/main.go b/main.go index 1819d77..d219aa1 100644 --- a/main.go +++ b/main.go @@ -44,8 +44,6 @@ func main() { me.pollDelay = 3 * time.Second me.failcountmax = 20 // die every minute if zookeeper can't be found - // me.machine.ConfigLoad() - me.forge = forgepb.InitPB() me.machine = zoopb.InitMachine() diff --git a/watchdog.go b/watchdog.go index f42e516..66bed5f 100644 --- a/watchdog.go +++ b/watchdog.go @@ -20,30 +20,26 @@ func NewWatchdog() { me.dog = time.NewTicker(me.pollDelay) defer me.dog.Stop() done := make(chan bool) - /* - // this example would exit/destroy the ticker in 10 seconds - go func() { - time.Sleep(10 * time.Second) - done <- true - }() - */ for { select { case <-done: fmt.Println("Done!") return case _ = <-me.dog.C: - // log.Info("Watchdog() ticked", me.zookeeper, "Current time: ", t) s := me.machine.UpdatePackages() - // pingStatus() me.failcount += 1 sendMachine(s) if me.failcount > 20 { os.Exit(0) } - // h.pollHypervisor() - // h.Scan() } } + /* + // this example would exit/destroy the ticker in 10 seconds + go func() { + time.Sleep(10 * time.Second) + done <- true + }() + */ } -- cgit v1.2.3