Merge pull request #1136 from aledbf/revert-status
Fix status update - changed in #1074
This commit is contained in:
commit
81a36b4bee
1 changed files with 6 additions and 0 deletions
|
@ -92,10 +92,16 @@ 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 wait.Forever(s.update, updateInterval)
|
||||
go s.syncQueue.Run(time.Second, stopCh)
|
||||
<-stopCh
|
||||
}
|
||||
|
||||
func (s *statusSync) update() {
|
||||
// send a dummy object to the queue to force a sync
|
||||
s.syncQueue.Enqueue("sync status")
|
||||
}
|
||||
|
||||
// Shutdown stop the sync. In case the instance is the leader it will remove the current IP
|
||||
// if there is no other instances running.
|
||||
func (s statusSync) Shutdown() {
|
||||
|
|
Loading…
Reference in a new issue