diff options
| author | Jeff Carr <[email protected]> | 2025-08-17 00:06:59 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-17 00:13:27 -0500 |
| commit | dda562968896a6bd25134e49fb495b401a3986d1 (patch) | |
| tree | 13862030d4f85160e20188b0abcccfdca7d0b000 /windowZood.go | |
| parent | f39125655d2c8efdbc8c1feefd572e67b9a86cd0 (diff) | |
update 10 at a time
Diffstat (limited to 'windowZood.go')
| -rw-r--r-- | windowZood.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/windowZood.go b/windowZood.go index 2719e3a..80ebeb3 100644 --- a/windowZood.go +++ b/windowZood.go @@ -59,16 +59,24 @@ func makeZoodWin() *stdTableWin { stdw.versionL = grid.NewLabel("scan") stdw.outOfDate = grid.NewCheckbox("out of date") stdw.showAll = grid.NewCheckbox("all") - grid.NewButton("show out of date", func() { - found := zoopb.NewMachines() + grid.NewButton("upgrade 10", func() { + var count int all := me.machines.All() for all.Scan() { m := all.Next() + mtime := m.Laststamp.AsTime() + if time.Since(mtime) > 10*time.Hour { + continue + } if m.FindVersion("zood") != me.zood.version { - found.Append(m) + count += 1 + m.Upgrade = true + log.Info("upgrade", m.Hostname, count) + } + if count > 9 { + return } } - stdw.doMachinesUpgradeTable(found) }) // make a box at the bottom of the window for the protobuf table |
