From eb4ddd9ecbdf3815e329f079d7f382291fabedad Mon Sep 17 00:00:00 2001 From: Josh Deprez Date: Wed, 2 Oct 2024 09:31:59 +1000 Subject: [PATCH] Make comment in limiter Create clearer Co-authored-by: Artem Zinnatullin --- internal/controller/scheduler/limiter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/scheduler/limiter.go b/internal/controller/scheduler/limiter.go index 95b6df9e..5c04ba36 100644 --- a/internal/controller/scheduler/limiter.go +++ b/internal/controller/scheduler/limiter.go @@ -92,8 +92,8 @@ func (l *MaxInFlightLimiter) Create(ctx context.Context, job monitor.Job) error return nil } - // Block until there's a token in the bucket, or the job information becomes - // too stale. + // Block until there's a token in the bucket, or cancel if the job + // information becomes too stale. select { case <-ctx.Done(): return context.Cause(ctx)