Skip to content

Commit

Permalink
Drop things from the queue when completed
Browse files Browse the repository at this point in the history
  • Loading branch information
dramich committed Apr 16, 2020
1 parent 4645d8d commit 19664dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/clustercache/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ func (h *clusterCache) List(gvr schema2.GroupVersionResource) []interface{} {
}

func (h *clusterCache) start() {
defer h.workqueue.ShutDown()
for {
eventObj, ok := h.workqueue.Get()
if ok {
Expand Down Expand Up @@ -247,6 +248,7 @@ func (h *clusterCache) start() {
logrus.Errorf("failed to handle remove event: %v", err)
}
}
h.workqueue.Done(eventObj)
}
}

Expand Down

0 comments on commit 19664dd

Please sign in to comment.