code re-org and bugfix hanging hourly snapshot
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:
4
main.go
4
main.go
@@ -185,7 +185,7 @@ 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)
|
||||
ct.RunVcenterSnapshotHourly(ctx, logger, true)
|
||||
logger.Info("One-shot inventory snapshot complete; exiting")
|
||||
return
|
||||
}
|
||||
@@ -200,7 +200,7 @@ func main() {
|
||||
job3, err := c.NewJob(
|
||||
gocron.DurationJob(cronSnapshotFrequency),
|
||||
gocron.NewTask(func() {
|
||||
ct.RunVcenterSnapshotHourly(ctx, logger)
|
||||
ct.RunVcenterSnapshotHourly(ctx, logger, false)
|
||||
}), gocron.WithSingletonMode(gocron.LimitModeReschedule),
|
||||
gocron.WithStartAt(gocron.WithStartDateTime(startsAt3)),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user