mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 10:45:06 +01:00 
			
		
		
		
	Fix: Start cache manager only when NumCacheIntervals > 0
This commit is contained in:
		@@ -100,7 +100,7 @@ func (r *metricRouter) Init(ticker mct.MultiChanTicker, wg *sync.WaitGroup, rout
 | 
			
		||||
		cclog.ComponentError("MetricRouter", err.Error())
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if r.config.NumCacheIntervals >= 0 {
 | 
			
		||||
	if r.config.NumCacheIntervals > 0 {
 | 
			
		||||
		r.cache, err = NewCache(r.cache_input, r.ticker, &r.cachewg, r.config.NumCacheIntervals)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			cclog.ComponentError("MetricRouter", "MetricCache initialization failed:", err.Error())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user