mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Cleanup: no need for stacked timing loops
This commit is contained in:
parent
5de9071b5c
commit
d57531d924
@ -85,14 +85,7 @@ func (p *PodCache) UpdateAllContainers() {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *PodCache) synchronizeContainers() {
|
||||
ticker := time.Tick(p.period)
|
||||
for _ = range ticker {
|
||||
p.UpdateAllContainers()
|
||||
}
|
||||
}
|
||||
|
||||
// Loop runs forever, it is expected to be placed in a go routine.
|
||||
func (p *PodCache) Loop() {
|
||||
util.Forever(func() { p.synchronizeContainers() }, 0)
|
||||
util.Forever(func() { p.UpdateAllContainers() }, p.period)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user