Skip to content

Commit

Permalink
remove loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc committed May 3, 2024
1 parent 2693c3e commit e3e2cdf
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions common/ratelimit/limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ func (d *rateLimiter) checkAllowed(ctx context.Context, params common.RequestPar
d.logger.Debug("Bucket level updated", "key", params.RequesterID, "prevLevel", prevLevel, "level", bucketParams.BucketLevels[i], "size", size, "interval", interval, "deduction", deduction, "allowed", allowed)
}

for i, level := range bucketParams.BucketLevels {
d.bucketLevels.With(prometheus.Labels{"requester_id": params.RequesterID, "bucket_index": fmt.Sprintf("%d", i)}).Set(float64(level))
d.logger.Debug("Bucket level updated", "requester_id", params.RequesterID, "bucket_index", i, "level", level)
}

return allowed, bucketParams

}
Expand Down

0 comments on commit e3e2cdf

Please sign in to comment.