Skip to content

Commit 1ea376a

Browse files
authored
Replace deprecated queue method (#11853)
1 parent 7b4e4e2 commit 1ea376a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/task/queue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var keyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
3636
// which timestamp is older than the last successful get operation.
3737
type Queue struct {
3838
// queue is the work queue the worker polls
39-
queue workqueue.RateLimitingInterface
39+
queue workqueue.TypedRateLimitingInterface[any]
4040
// sync is called for each item in the queue
4141
sync func(interface{}) error
4242
// workerDone is closed when the worker exits
@@ -172,7 +172,7 @@ func NewTaskQueue(syncFn func(interface{}) error) *Queue {
172172
// NewCustomTaskQueue creates a new custom task queue with the given sync function.
173173
func NewCustomTaskQueue(syncFn func(interface{}) error, fn func(interface{}) (interface{}, error)) *Queue {
174174
q := &Queue{
175-
queue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()),
175+
queue: workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedControllerRateLimiter[any]()),
176176
sync: syncFn,
177177
workerDone: make(chan bool),
178178
fn: fn,

0 commit comments

Comments
 (0)