mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-07 03:28:42 +00:00
Drop things from the queue when completed
This commit is contained in:
parent
4645d8df16
commit
f620bd48b5
@ -216,6 +216,7 @@ func (h *clusterCache) List(gvr schema2.GroupVersionResource) []interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *clusterCache) start() {
|
func (h *clusterCache) start() {
|
||||||
|
defer h.workqueue.ShutDown()
|
||||||
for {
|
for {
|
||||||
eventObj, ok := h.workqueue.Get()
|
eventObj, ok := h.workqueue.Get()
|
||||||
if ok {
|
if ok {
|
||||||
@ -227,6 +228,7 @@ func (h *clusterCache) start() {
|
|||||||
w := h.watchers[event.gvr]
|
w := h.watchers[event.gvr]
|
||||||
h.RUnlock()
|
h.RUnlock()
|
||||||
if w == nil {
|
if w == nil {
|
||||||
|
h.workqueue.Done(eventObj)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,6 +249,7 @@ func (h *clusterCache) start() {
|
|||||||
logrus.Errorf("failed to handle remove event: %v", err)
|
logrus.Errorf("failed to handle remove event: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
h.workqueue.Done(eventObj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user