You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a closer look at workqueueWithCustomAddFunc. It currently only overwrites the Add func. Would it also make sense to overwrite AddRateLimited, AddAfter and AddWithOpts?
For AddWithOpts ideally only set priority if not already set, but atm we can't differentiate between priority intentionally set to 0 and the zero value, because Priority in AddOpts is not a pointer (probably it should be).
I know that for our builtin event handler we only have to overwrite Add. But I assume if folks use WithLowPriorityWhenUnchanged they would probably expect that it works for all Add funcs.
Tasks:
Consider to make AddOpts.Priority a pointer so we can differentiate between not set and priority 0 (the zero value)
The text was updated successfully, but these errors were encountered:
If I'm not missing anything even if you use handler.Funcs you would implement a func like this: func(context.Context, event.TypedCreateEvent[object], workqueue.TypedRateLimitingInterface[request])
The workqueue.TypedRateLimitingInterface[request] parameter then provides all Add* funcs, but only Addwill set the low priority
Note to myself. When looking into this we might also want to make AddOpts.Priority a pointer so we can differentiate between not set and priority 0 (the zero value)
I took a closer look at workqueueWithCustomAddFunc. It currently only overwrites the Add func. Would it also make sense to overwrite AddRateLimited, AddAfter and AddWithOpts?
For AddWithOpts ideally only set priority if not already set, but atm we can't differentiate between priority intentionally set to 0 and the zero value, because Priority in AddOpts is not a pointer (probably it should be).
I know that for our builtin event handler we only have to overwrite Add. But I assume if folks use WithLowPriorityWhenUnchanged they would probably expect that it works for all Add funcs.
Tasks:
The text was updated successfully, but these errors were encountered: