diff options
Diffstat (limited to 'daemon.go')
| -rw-r--r-- | daemon.go | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -9,6 +9,7 @@ import ( "time" "go.wit.com/lib/debian" + "go.wit.com/log" ) // timeFunction takes a function as an argument and returns the execution time. @@ -29,9 +30,16 @@ func zood() { fmt.Println("Done!") return case _ = <-me.dog.C: - s := debian.UpdatePackages(me.machine) - me.failcount += 1 - sendMachine(s) + err := debian.UpdatePackages(me.machine) + if err != nil { + log.Info("UpdatePackages err", err) + me.failcount += 1 + } + err = sendMachine(me.machine) + if err != nil { + log.Info("sendMachine err", err) + me.failcount += 1 + } if me.failcount > 20 { os.Exit(0) |
