Skip to content

Commit

Permalink
Merge pull request #572 from ixti/ixti/fix-redis-4.6.0-warnings
Browse files Browse the repository at this point in the history
fix: Fix redis-rb 4.6.0 deprecation warnings
  • Loading branch information
grzuy authored Feb 7, 2022
2 parents 8218132 + c01208a commit d41abd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rack/attack/store_proxy/redis_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def write(key, value, options = {})

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
Expand Down

0 comments on commit d41abd7

Please sign in to comment.