mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-28 07:57:20 +00:00
Merge pull request #94813 from dramich/nometrics
Don't start goroutine for noMetrics Kubernetes-commit: c4aca30005dacca3f768e511f3e424893161558d
This commit is contained in:
commit
2b31242e93
@ -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