|
@@ -105,18 +105,19 @@ func customScoreInfluxDB(metrics []string, uuid string, socket,
|
|
|
// Calculate the average for the metrics provided
|
|
|
return calculateWeightedAverage(response, numberOfRows, len(metrics))
|
|
|
}
|
|
|
-func InvalidateCache() {
|
|
|
- // Check if the cache needs update
|
|
|
- select {
|
|
|
- // clean the cache if 10 seconds are passed
|
|
|
- case <-customcache.LabCache.Timeout.C:
|
|
|
- klog.Infof("Time to erase")
|
|
|
- //customcache.LabCache.Timeout.Stop()
|
|
|
- customcache.LabCache.CleanCache()
|
|
|
-
|
|
|
- default:
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
+// func InvalidateCache() {
|
|
|
+// // Check if the cache needs update
|
|
|
+// select {
|
|
|
+// // clean the cache if 10 seconds are passed
|
|
|
+// case <-customcache.LabCache.Timeout.C:
|
|
|
+// klog.Infof("Time to erase")
|
|
|
+// //customcache.LabCache.Timeout.Stop()
|
|
|
+// customcache.LabCache.CleanCache()
|
|
|
+
|
|
|
+// default:
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
func customResourceScorer(nodeName string) (float64, error) {
|
|
|
|