Skip to content

Commit

Permalink
next little change
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <[email protected]>
  • Loading branch information
Per Goncalves da Silva committed Jan 6, 2025
1 parent e016e73 commit 61608d0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/lib/queueinformer/queueinformer_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,21 @@ func (o *operator) processNextWorkItem(ctx context.Context, loop *QueueInformer)
var event = item
if item.Type() != kubestate.ResourceDeleted {
// Get the key
key, keyable := loop.key(item)
if !keyable {
//key, keyable := loop.key(item)
//if !keyable {
// logger.WithField("item", item).Warn("could not form key")
// queue.Forget(item)
// return true
//}
key, ok := item.Resource().(string)
if !ok {
logger.WithField("item", item).Warn("could not form key")
queue.Forget(item)
return true
}

logger = logger.WithField("cache-key", key)

// Get the current cached version of the resource
var exists bool
var err error
Expand Down

0 comments on commit 61608d0

Please sign in to comment.