improve tracking of VM deletions
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:
17
main.go
17
main.go
@@ -281,6 +281,23 @@ func main() {
|
||||
}
|
||||
logger.Debug("Created snapshot cleanup cron job", "job", job6.ID())
|
||||
|
||||
// Retry failed hourly snapshots
|
||||
retrySeconds := s.Values.Settings.HourlySnapshotRetrySeconds
|
||||
if retrySeconds <= 0 {
|
||||
retrySeconds = 300
|
||||
}
|
||||
job7, err := c.NewJob(
|
||||
gocron.DurationJob(time.Duration(retrySeconds)*time.Second),
|
||||
gocron.NewTask(func() {
|
||||
ct.RunHourlySnapshotRetry(ctx, logger)
|
||||
}), gocron.WithSingletonMode(gocron.LimitModeReschedule),
|
||||
)
|
||||
if err != nil {
|
||||
logger.Error("failed to start hourly snapshot retry cron job", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
logger.Debug("Created hourly snapshot retry cron job", "job", job7.ID(), "interval_seconds", retrySeconds)
|
||||
|
||||
// start cron scheduler
|
||||
c.Start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user