浏览代码

added in-memory

Achilleas Tzenetopoulos 5 年之前
父节点
当前提交
f67efb9fe1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      kubernetes-v1.15.4/pkg/scheduler/scheduler.go

+ 2 - 2
kubernetes-v1.15.4/pkg/scheduler/scheduler.go

@@ -252,14 +252,14 @@ func NewFromConfig(config *factory.Config) *Scheduler {
 	}
 }
 
-var timeout *time.Ticker = time.NewTicker(time.Duration(10 * time.Second))
+var timeout *time.Ticker
 
 // 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
 	}
-
+	timeout = time.NewTicker(time.Duration(10 * time.Second))
 	go wait.Until(sched.scheduleOne, 0, sched.config.StopEverything)
 }