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