Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing the timeout as a positional argument is deprecated #213

Open
michaelfranzl opened this issue Oct 18, 2022 · 3 comments
Open

Passing the timeout as a positional argument is deprecated #213

michaelfranzl opened this issue Oct 18, 2022 · 3 comments

Comments

@michaelfranzl
Copy link

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:

result = @redis.send(command, *args, &block)

Related Sidekiq issue: sidekiq/sidekiq#5488 (comment)

@fatkodima
Copy link
Contributor

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

@nilcolor
Copy link

nilcolor commented Apr 4, 2023

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.

@PatrickTulskie
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants