mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
RateLimiter: change CanAccept() to TryAccept()
This commit is contained in:
@@ -163,7 +163,7 @@ func (q *RateLimitedTimedQueue) Try(fn ActionFunc) {
|
||||
val, ok := q.queue.Head()
|
||||
for ok {
|
||||
// rate limit the queue checking
|
||||
if !q.limiter.CanAccept() {
|
||||
if !q.limiter.TryAccept() {
|
||||
glog.V(10).Info("Try rate limitted...")
|
||||
// Try again later
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user