From d57531d924da0473bfc98bc2a59b38b56c9aa234 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Fri, 20 Jun 2014 12:57:22 -0700 Subject: [PATCH] Cleanup: no need for stacked timing loops --- pkg/master/pod_cache.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/master/pod_cache.go b/pkg/master/pod_cache.go index d0355b360d2..0e7cecb1435 100644 --- a/pkg/master/pod_cache.go +++ b/pkg/master/pod_cache.go @@ -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) }