class Aws::Plugins::Retries::ClientRateLimiter
def token_bucket_update_rate(new_rps)
def token_bucket_update_rate(new_rps) # Refill based on our current rate before we update to the # new fill rate token_bucket_refill @fill_rate = [new_rps, MIN_FILL_RATE].max @max_capacity = [new_rps, MIN_CAPACITY].max # When we scale down we can't have a current capacity that exceeds our # max_capacity. @current_capacity = [@current_capacity, @max_capacity].min end