From 253e1a6fdadebfcbd11531a6992587f7a1b3ba8a Mon Sep 17 00:00:00 2001 From: Anton Korotkov <106995168+korotkov-aerospike@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:38:28 +0300 Subject: [PATCH] Increase scheduler outdated threshold (#226) increase threshold timeout --- pkg/service/backup_scheduler.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/service/backup_scheduler.go b/pkg/service/backup_scheduler.go index 18792d61..77ad10c0 100644 --- a/pkg/service/backup_scheduler.go +++ b/pkg/service/backup_scheduler.go @@ -71,7 +71,11 @@ func ApplyNewConfig(scheduler quartz.Scheduler, // starts and returns the scheduler. func ScheduleBackup(ctx context.Context, config *model.Config, handlers BackupHandlerHolder, ) (quartz.Scheduler, error) { - scheduler := quartz.NewStdScheduler() + scheduler := quartz.NewStdSchedulerWithOptions(quartz.StdSchedulerOptions{ + OutdatedThreshold: 1 * time.Second, + RetryInterval: 100 * time.Millisecond, + }, nil, nil) + scheduler.Start(ctx) err := scheduleRoutines(scheduler, config, handlers)