re-apply minimum snapshot interval
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:
@@ -1125,8 +1125,8 @@ func (c *CronTask) compareWithPreviousSnapshot(
|
|||||||
if prevTableName != "" {
|
if prevTableName != "" {
|
||||||
moreMissing := c.markMissingFromPrevious(ctx, dbConn, prevTableName, url, startTime, presentSnapshots, presentByUuid, presentByName, inventoryByVmID, inventoryByUuid, inventoryByName)
|
moreMissing := c.markMissingFromPrevious(ctx, dbConn, prevTableName, url, startTime, presentSnapshots, presentByUuid, presentByName, inventoryByVmID, inventoryByUuid, inventoryByName)
|
||||||
missingCount += moreMissing
|
missingCount += moreMissing
|
||||||
expectedSeconds := int64(c.Settings.Values.Settings.VcenterInventorySnapshotSeconds)
|
expectedSeconds := int64(c.Settings.Values.Settings.VcenterInventorySnapshotSeconds) / 2
|
||||||
// Skip only if snapshots are much closer together than the configured cadence.
|
// Skip only if snapshots are closer together than half the configured cadence
|
||||||
if SnapshotTooSoon(prevSnapshotTime, startTime.Unix(), expectedSeconds) {
|
if SnapshotTooSoon(prevSnapshotTime, startTime.Unix(), expectedSeconds) {
|
||||||
c.Logger.Info("skipping new-VM detection because snapshots are too close together", "prev_table", prevTableName, "prev_snapshot_unix", prevSnapshotTime, "current_snapshot_unix", startTime.Unix(), "expected_interval_seconds", expectedSeconds)
|
c.Logger.Info("skipping new-VM detection because snapshots are too close together", "prev_table", prevTableName, "prev_snapshot_unix", prevSnapshotTime, "current_snapshot_unix", startTime.Unix(), "expected_interval_seconds", expectedSeconds)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user