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 /send.go | |
| parent | b71fec22c8cc6c5b3be47bd782a7c807be75216c (diff) | |
someday this will workv0.0.7
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 |
