Replace secret workqueue
This commit is contained in:
parent
7c635a8c83
commit
f28142ae8e
4 changed files with 86 additions and 136 deletions
|
|
@ -82,15 +82,17 @@ func (t *Queue) worker() {
|
|||
close(t.workerDone)
|
||||
return
|
||||
}
|
||||
defer t.queue.Done(key)
|
||||
|
||||
glog.V(3).Infof("syncing %v", key)
|
||||
if err := t.sync(key); err != nil {
|
||||
glog.Warningf("requeuing %v, err %v", key, err)
|
||||
t.queue.AddRateLimited(key)
|
||||
} else {
|
||||
err := t.sync(key)
|
||||
if err == nil {
|
||||
t.queue.Forget(key)
|
||||
return
|
||||
}
|
||||
|
||||
t.queue.Done(key)
|
||||
glog.Warningf("requeuing %v, err %v", key, err)
|
||||
t.queue.AddRateLimited(key)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue