|
@@ -252,13 +252,14 @@ func NewFromConfig(config *factory.Config) *Scheduler {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
|
|
|
+
|
|
|
// Run begins watching and scheduling. It waits for cache to be synced, then starts a goroutine and returns immediately.
|
|
|
func (sched *Scheduler) Run() {
|
|
|
if !sched.config.WaitForCacheSync() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
|
|
|
go wait.Until(sched.scheduleOne, 0, sched.config.StopEverything)
|
|
|
}
|
|
|
|