Remove unnecessary periodic sync
This commit is contained in:
parent
a091d3ede7
commit
69e766e042
3 changed files with 12 additions and 22 deletions
|
|
@ -92,10 +92,7 @@ type statusSync struct {
|
|||
// Run starts the loop to keep the status in sync
|
||||
func (s statusSync) Run(stopCh <-chan struct{}) {
|
||||
go wait.Forever(s.elector.Run, 0)
|
||||
go s.run()
|
||||
|
||||
go s.syncQueue.Run(time.Second, stopCh)
|
||||
|
||||
<-stopCh
|
||||
}
|
||||
|
||||
|
|
@ -136,20 +133,6 @@ func (s statusSync) Shutdown() {
|
|||
s.updateStatus([]v1.LoadBalancerIngress{})
|
||||
}
|
||||
|
||||
func (s *statusSync) run() {
|
||||
err := wait.PollInfinite(updateInterval, func() (bool, error) {
|
||||
if s.syncQueue.IsShuttingDown() {
|
||||
return true, nil
|
||||
}
|
||||
// send a dummy object to the queue to force a sync
|
||||
s.syncQueue.Enqueue("dummy")
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
glog.Errorf("error waiting shutdown: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *statusSync) sync(key interface{}) error {
|
||||
s.runLock.Lock()
|
||||
defer s.runLock.Unlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue