cleanups and code fixes incl templ
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-03-20 13:21:15 +11:00
parent 4fbb2582e3
commit 9a561f3b07
24 changed files with 425 additions and 141 deletions

10
main.go
View File

@@ -285,7 +285,10 @@ func main() {
// One-shot mode: run a single inventory snapshot across all configured vCenters and exit.
if *runInventory {
logger.Info("Running one-shot inventory snapshot across all vCenters")
ct.RunVcenterSnapshotHourly(ctx, logger, true)
if err := ct.RunVcenterSnapshotHourly(ctx, logger, true); err != nil {
logger.Error("One-shot inventory snapshot failed", "error", err)
os.Exit(1)
}
logger.Info("One-shot inventory snapshot complete; exiting")
return
}
@@ -403,7 +406,10 @@ func main() {
)
//logger.Debug("Server configured", "object", svr)
svr.StartAndWait()
if err := svr.StartAndWait(); err != nil {
logger.Error("server terminated with error", "error", err)
os.Exit(1)
}
os.Exit(0)
}