Remove item from taint manager workqueue on completion

parent debc5387
...@@ -224,9 +224,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) { ...@@ -224,9 +224,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) {
hash := hash(nodeUpdate.name()) hash := hash(nodeUpdate.name())
select { select {
case <-stopCh: case <-stopCh:
tc.nodeUpdateQueue.Done(item)
break break
case tc.nodeUpdateChannels[hash%workers] <- nodeUpdate: case tc.nodeUpdateChannels[hash%workers] <- nodeUpdate:
} }
tc.nodeUpdateQueue.Done(item)
} }
}(stopCh) }(stopCh)
...@@ -240,9 +242,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) { ...@@ -240,9 +242,11 @@ func (tc *NoExecuteTaintManager) Run(stopCh <-chan struct{}) {
hash := hash(podUpdate.nodeName()) hash := hash(podUpdate.nodeName())
select { select {
case <-stopCh: case <-stopCh:
tc.podUpdateQueue.Done(item)
break break
case tc.podUpdateChannels[hash%workers] <- podUpdate: case tc.podUpdateChannels[hash%workers] <- 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