|
@@ -40,7 +40,7 @@ import (
|
|
|
"k8s.io/kubernetes/pkg/scheduler/core"
|
|
|
|
|
|
// "k8s.io/kubernetes/pkg/scheduler/customcache"
|
|
|
- "github.com/iwita/kube-scheduler/customcache"
|
|
|
+ // "github.com/iwita/kube-scheduler/customcache"
|
|
|
|
|
|
"k8s.io/kubernetes/pkg/scheduler/factory"
|
|
|
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
|
|
@@ -458,16 +458,16 @@ func (sched *Scheduler) scheduleOne() {
|
|
|
|
|
|
//Check if the cache needs update
|
|
|
//klog.Infof("The value of the Ticker: %v", customcache.LabCache.Timeout.C)
|
|
|
- select {
|
|
|
- // clean the cache if 10 seconds are passed
|
|
|
- case <-customcache.LabCache.Timeout.C:
|
|
|
- klog.Infof("Time to erase: %v", time.Now())
|
|
|
- //customcache.LabCache.Timeout.Stop()
|
|
|
- customcache.LabCache.CleanCache()
|
|
|
- klog.Infof("Cache: %v", customcache.LabCache.Cache)
|
|
|
- default:
|
|
|
- klog.Infof("Cache is Valid, Time: %v", customcache.LabCache.Timeout.C)
|
|
|
- }
|
|
|
+ // select {
|
|
|
+ // // clean the cache if 10 seconds are passed
|
|
|
+ // case <-customcache.LabCache.Timeout.C:
|
|
|
+ // klog.Infof("Time to erase: %v", time.Now())
|
|
|
+ // //customcache.LabCache.Timeout.Stop()
|
|
|
+ // customcache.LabCache.CleanCache()
|
|
|
+ // klog.Infof("Cache: %v", customcache.LabCache.Cache)
|
|
|
+ // default:
|
|
|
+ // klog.Infof("Cache is Valid, Time: %v", customcache.LabCache.Timeout.C)
|
|
|
+ // }
|
|
|
fwk := sched.config.Framework
|
|
|
|
|
|
pod := sched.config.NextPod()
|