Skip to content

Commit

Permalink
fix(git-controller) rm deprecated Ratelimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
kengou committed Dec 12, 2024
1 parent 44eb53c commit 96c902d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/git_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type GitController struct {
client client.Client
scheme *runtime.Scheme
repositorySyncer *git.RepositorySyncer
queue workqueue.RateLimitingInterface
queue workqueue.TypedRateLimitingInterface[interface{}]
wg sync.WaitGroup
mtx sync.Mutex
}
Expand Down Expand Up @@ -258,7 +258,7 @@ func (g *GitController) SetupWithManager(mgr ctrl.Manager) error {

g.scheme = mgr.GetScheme()
g.client = mgr.GetClient()
g.queue = workqueue.NewRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter(30*time.Second, 600*time.Second))
g.queue = workqueue.NewTypedRateLimitingQueue(workqueue.NewTypedItemExponentialFailureRateLimiter[interface{}](30*time.Second, 600*time.Second))
g.ControllerOptions.Namespace = util.GetEnv("NAMESPACE", g.ControllerOptions.Namespace)

if err := mgr.Add(g); err != nil {
Expand Down

0 comments on commit 96c902d

Please sign in to comment.