Skip to content

Commit

Permalink
Merge pull request #31 from controlshift/integer-interval
Browse files Browse the repository at this point in the history
Cast interval to an integer, not a float
  • Loading branch information
packrat386 authored Oct 15, 2019
2 parents c163145 + ada771b commit 09b99e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sidekiq-rate-limiter/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def limit(work)

options = {
:limit => (limit.respond_to?(:call) ? limit.call(*args) : limit).to_i,
:interval => (interval.respond_to?(:call) ? interval.call(*args) : interval).to_f,
:interval => (interval.respond_to?(:call) ? interval.call(*args) : interval).to_i,
:name => (name.respond_to?(:call) ? name.call(*args) : name).to_s,
}

Expand Down

0 comments on commit 09b99e1

Please sign in to comment.