diff options
Diffstat (limited to 'send.go')
| -rw-r--r-- | send.go | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -10,14 +10,9 @@ import ( "go.wit.com/log" ) -var urlbase string = "http://zookeeper.grid.wit.com:8080" - -func send() { -} - func pingStatus() error { var url string - url = urlbase + "/status?hostname=" + me.hostname + url = me.urlbase + "/status?hostname=" + me.hostname msg, err := me.machine.Packages.Marshal() if err != nil { log.Info("proto.Marshal() failed:", err) @@ -45,7 +40,7 @@ func pingStatus() error { func sendMachine(s string) error { var url string - url = urlbase + "/machine" + url = me.urlbase + "/machine" msg, err := me.machine.Marshal() if err != nil { log.Info("proto.Marshal() failed:", err) @@ -62,6 +57,7 @@ func sendMachine(s string) error { for _, line := range strings.Split(test, "\n") { if line == "upgrade" { log.Info(s, "zookeeper is healthy", len(msg)) + me.failcount = 0 } else if line == "kill" { os.Exit(0) } else if strings.HasPrefix(line, "apt update") { @@ -71,7 +67,7 @@ func sendMachine(s string) error { log.Sleep(1) os.Exit(0) } else { - log.Info(urlbase, "is maybe not working GOT:", line) + log.Info(me.urlbase, "is maybe not working GOT:", line) } } return nil |
