This commit is contained in:
Tomas Dvorak committed 2026-02-22 15:41:27 +01:00
1 parent 0b88627e54
commit 409acd2e08
84 files changed
+65382 -27475

No files matched your search

+5 -2
View File
@@ -3,6 +3,7 @@ package scheduler
import (
"context"
"fmt"
"time"
"github.com/robfig/cron/v3"
@@ -49,9 +50,11 @@ func (s *Scheduler) Start(ctx context.Context) error {
schedule = "@every " + s.config.Interval.String()
}
s.cron.AddFunc(schedule, func() {
if _, err := s.cron.AddFunc(schedule, func() {
s.syncAll(ctx)
})
}); err != nil {
return fmt.Errorf("failed to schedule sync job: %w", err)
}
s.cron.Start()
return nil