Skip to content

Commit

Permalink
Rollback queue refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Apr 27, 2017
1 parent 7deb1a2 commit 7eee34f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/pkg/task/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,16 @@ func (t *Queue) worker() {
close(t.workerDone)
return
}
defer t.queue.Done(key)

glog.V(3).Infof("syncing %v", key)
err := t.sync(key)
if err == nil {
if err := t.sync(key); err != nil {
glog.Warningf("requeuing %v, err %v", key, err)
t.queue.AddRateLimited(key)
} else {
t.queue.Forget(key)
return
}

glog.Warningf("requeuing %v, err %v", key, err)
t.queue.AddRateLimited(key)
t.queue.Done(key)
}
}

Expand Down

0 comments on commit 7eee34f

Please sign in to comment.