mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Merge pull request #572 from ixti/ixti/fix-redis-4.6.0-warnings
fix: Fix redis-rb 4.6.0 deprecation warnings
This commit is contained in:
commit
d41abd7908
1 changed files with 3 additions and 3 deletions
|
|
@ -32,9 +32,9 @@ module Rack
|
|||
|
||||
def increment(key, amount, options = {})
|
||||
rescuing do
|
||||
pipelined do
|
||||
incrby(key, amount)
|
||||
expire(key, options[:expires_in]) if options[:expires_in]
|
||||
pipelined do |redis|
|
||||
redis.incrby(key, amount)
|
||||
redis.expire(key, options[:expires_in]) if options[:expires_in]
|
||||
end.first
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue