Skip to content

Commit

Permalink
Rename method argument for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Dec 13, 2024
1 parent 4879d0f commit 09df1a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/peddler/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def http

# Throttles with a rate limit and retries when the API returns a 429
#
# @param [Float] rate_limit The delay in seconds before retrying
# @param [Float] requests_per_second
# @return [self]
def meter(rate_limit)
def meter(requests_per_second)
# HTTP v6.0 will implement retriable. Until then, point to their GitHub repo, or it's a no-op.
# https://github.com/httprb/http/pull/790
delay = sandbox? ? 0.2 : 1.0 / rate_limit
delay = sandbox? ? 0.2 : 1.0 / requests_per_second
retriable(delay: delay, tries: 3, retry_statuses: [429])

self
Expand Down

0 comments on commit 09df1a4

Please sign in to comment.