ejfinneran / ratelimit

A Redis-backed rate limiter written in Ruby
MIT License
260 stars 57 forks source link

Deprecation warning with new versions of redis #40

Closed andreasknoepfle closed 2 years ago

andreasknoepfle commented 2 years ago

After updating redis-rb in our project we received the following deprecation warning:

Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.multi do
  redis.get("key")
end

should be replaced by

redis.multi do |pipeline|
  pipeline.get("key")
end

I noticed that the call comes from this library. I would drop a quick PR for updating this code path if that is all right :)

Cheers 👋 Andi

andreasknoepfle commented 2 years ago

See also #39

andreasknoepfle commented 1 year ago

https://rubygems.org/gems/ratelimit/versions/1.0.4