From d62931e46a9d38967ae28140471b773fa6ffc77d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 29 Dec 2024 23:21:21 -0600 Subject: [PATCH] do targets some other way Signed-off-by: Jeff Carr --- http.go | 4 ++-- main.go | 2 +- structs.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/http.go b/http.go index b0a9f8c..a6af0a0 100644 --- a/http.go +++ b/http.go @@ -85,7 +85,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { if zood == nil { log.Info("machine", m.Hostname, "does not have zood installed") } else { - log.Info("zood version", zood.Version, "vs target version", v, "on machine", m.Hostname) + log.Info(fmt.Sprintf("zood version %s vs target version %s on machine %s", zood.Version, v, m.Hostname)) } } return @@ -116,7 +116,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { if route == "/target" { log.HttpMode(w) defer log.HttpMode(nil) - me.targets[packname] = version + // me.targets[packname] = version log.Log(NOW, "setting package/version to ", packname, " ", version) return } diff --git a/main.go b/main.go index 1f4b2a6..2b81159 100644 --- a/main.go +++ b/main.go @@ -52,7 +52,7 @@ func main() { log.Warn("load config failed", err) os.Exit(-1) } - me.targets = make(map[string]string) // keep track of what versions the machines should be running + // me.targets = make(map[string]string) // keep track of what versions the machines should be running me.upgrade = make(map[string]bool) // used to trigger upgrade attempts go NewWatchdog() diff --git a/structs.go b/structs.go index 65d5173..ad68e73 100644 --- a/structs.go +++ b/structs.go @@ -17,6 +17,6 @@ type stuff struct { distro string // debian,redhat,gentoo,macos,wincrap packages *zoopb.Packages // installed packages and versions machines *zoopb.Machines // every machine that has reported itself to the zookeeper - targets map[string]string // what versions the machines should be running + // targets map[string]string // what versions the machines should be running upgrade map[string]bool // use this to trigger builds }