Remove item from taint manager workqueue on completion

parent d2b954ea
...@@ -189,9 +189,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) { ...@@ -189,9 +189,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) {
nodeUpdate := item.(*nodeUpdateItem) nodeUpdate := item.(*nodeUpdateItem)
select { select {
case <-stopCh: case <-stopCh:
tc.nodeUpdateQueue.Done(item)
break break
case tc.nodeUpdateChannel <- nodeUpdate: case tc.nodeUpdateChannel <- nodeUpdate:
} }
tc.nodeUpdateQueue.Done(item)
} }
}(stopCh) }(stopCh)
...@@ -204,9 +206,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) { ...@@ -204,9 +206,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) {
podUpdate := item.(*podUpdateItem) podUpdate := item.(*podUpdateItem)
select { select {
case <-stopCh: case <-stopCh:
tc.podUpdateQueue.Done(item)
break break
case tc.podUpdateChannel <- podUpdate: case tc.podUpdateChannel <- podUpdate:
} }
tc.podUpdateQueue.Done(item)
} }
}(stopCh) }(stopCh)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment