Skip to content

Commit 8ca2158

Browse files
committed
keep the core logic
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
1 parent f78cdf2 commit 8ca2158

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/utils/controller/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ func (w *controller) processNextWorkItem(ctx context.Context) bool {
260260
return true
261261
}
262262

263+
//lint:ignore SA1019 we need more time to fully migrate to RequeueAfter as we used these two fields separately.
263264
func (w *controller) reconcileHandler(ctx context.Context, key interface{}) {
264265
// Update metrics after processing each item
265266
reconcileStartTS := time.Now()
@@ -284,7 +285,7 @@ func (w *controller) reconcileHandler(ctx context.Context, key interface{}) {
284285
w.queue.Forget(key)
285286
w.queue.AddAfter(key, result.RequeueAfter)
286287
metrics.FleetReconcileTotal.WithLabelValues(w.name, labelRequeueAfter).Inc()
287-
case result.RequeueAfter > 0:
288+
case result.Requeue:
288289
w.queue.AddRateLimited(key)
289290
metrics.FleetReconcileTotal.WithLabelValues(w.name, labelRequeue).Inc()
290291
default:

0 commit comments

Comments
 (0)