mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 19:23:08 +02:00
Add error checks per report from errcheck-ng
This commit is contained in:
committed by
Oleksii Kliukin
parent
292a9bda05
commit
bc0e9ab4bc
@@ -532,7 +532,9 @@ func (c *Cluster) Delete() error {
|
||||
|
||||
// ReceivePodEvent is called back by the controller in order to add the cluster's pod event to the queue.
|
||||
func (c *Cluster) ReceivePodEvent(event spec.PodEvent) {
|
||||
c.podEventsQueue.Add(event)
|
||||
if err := c.podEventsQueue.Add(event); err != nil {
|
||||
c.logger.Errorf("error when receiving pod events: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Cluster) processPodEvent(obj interface{}) error {
|
||||
@@ -562,7 +564,9 @@ func (c *Cluster) processPodEventQueue(stopCh <-chan struct{}) {
|
||||
case <-stopCh:
|
||||
return
|
||||
default:
|
||||
c.podEventsQueue.Pop(cache.PopProcessFunc(c.processPodEvent))
|
||||
if _, err := c.podEventsQueue.Pop(cache.PopProcessFunc(c.processPodEvent)); err != nil {
|
||||
c.logger.Errorf("error when processing pod event queeue %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user