mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #94813 from dramich/nometrics
Don't start goroutine for noMetrics
This commit is contained in:
commit
c4aca30005
@ -55,7 +55,13 @@ func newQueue(c clock.Clock, metrics queueMetrics, updatePeriod time.Duration) *
|
|||||||
metrics: metrics,
|
metrics: metrics,
|
||||||
unfinishedWorkUpdatePeriod: updatePeriod,
|
unfinishedWorkUpdatePeriod: updatePeriod,
|
||||||
}
|
}
|
||||||
go t.updateUnfinishedWorkLoop()
|
|
||||||
|
// Don't start the goroutine for a type of noMetrics so we don't consume
|
||||||
|
// resources unnecessarily
|
||||||
|
if _, ok := metrics.(noMetrics); !ok {
|
||||||
|
go t.updateUnfinishedWorkLoop()
|
||||||
|
}
|
||||||
|
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user