cleanups and code fixes incl templ
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
10
main.go
10
main.go
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user