redis-namespace icon indicating copy to clipboard operation
redis-namespace copied to clipboard

Passing the timeout as a positional argument is deprecated

Open michaelfranzl opened this issue 3 years ago • 3 comments

There are lots of warnings with redis 4.8.0 and redis-namespace 1.9.0:

Passing the timeout as a positional argument is deprecated, it should be passed as a keyword argument:
  redis.brpop("myapp:queue:myqueue", timeout: 2)(called from: /home/me/.bundle/ruby/2.6.0/gems/redis-namespace-1.9.0/lib/redis/namespace.rb:479:in `call_with_namespace')

This is the location:

https://github.com/resque/redis-namespace/blob/2c1ae0f3c4b06b92712461dea387234a40a8164b/lib/redis/namespace.rb#L480

Related Sidekiq issue: https://github.com/mperham/sidekiq/issues/5488#issuecomment-1227209570

michaelfranzl avatar Oct 18 '22 07:10 michaelfranzl

Can you verify this is still happening with the latest versions of redis and redis-namespace? I can't reproduce.

fatkodima avatar Jan 17 '23 19:01 fatkodima

Still happens with

redis-namespace                  1.10.0
redis                            4.8.1

but locations is now different: lib/redis/namespace.rb:558

def wrapped_send(redis_client, command, args = [], &block)
  ...
  else
    redis_client.send(command, *args, &block) # <<-
  end
end

redis gem is not lates but we cannot yet move to 5.x (5.0.6) version.

nilcolor avatar Apr 04 '23 20:04 nilcolor

How are you calling to redis-namespace? I have some apps on 5.0 with the latest redis-namespace that do not exhibit this problem, but we also send over timeouts as a hash, not a positional argument.

PatrickTulskie avatar Apr 23 '24 17:04 PatrickTulskie