Move periodic backoff gc to federation utils

This commit is contained in:
Marcin Wielgus
2016-10-10 16:53:15 +02:00
parent e72f26a3ff
commit 47f0e738e9
6 changed files with 43 additions and 46 deletions

View File

@@ -180,14 +180,7 @@ func (nc *NamespaceController) Run(stopChan <-chan struct{}) {
nc.clusterDeliverer.StartWithHandler(func(_ *util.DelayingDelivererItem) {
nc.reconcileNamespacesOnClusterChange()
})
go func() {
select {
case <-time.After(time.Minute):
nc.namespaceBackoff.GC()
case <-stopChan:
return
}
}()
util.StartBackoffGC(nc.namespaceBackoff, stopChan)
}
func (nc *NamespaceController) deliverNamespaceObj(obj interface{}, delay time.Duration, failed bool) {