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

@@ -228,17 +228,7 @@ func (fdc *DeploymentController) Run(workers int, stopCh <-chan struct{}) {
go wait.Until(fdc.worker, time.Second, stopCh)
}
go func() {
for {
// Perform backof registry cleanup from time to time.
select {
case <-time.After(time.Minute):
fdc.deploymentBackoff.GC()
case <-stopCh:
return
}
}
}()
fedutil.StartBackoffGC(fdc.deploymentBackoff, stopCh)
<-stopCh
glog.Infof("Shutting down DeploymentController")