This error makes no sense because
From our Gemfile.lock:
sidekiq-pro (5.5.2)
sidekiq (>= 6.5.0)
redis (5.0.5)
redis-client (>= 0.9.0)
CodePudding user response:
The signature on that method includes a named argument timeout
which defaults to 0. Ruby will accept a hash at end of the list of arguments, but not an Integer or similar.
I suspect config[:fetch_timeout]
is nil, therefore the value of 1
is being passed, thus the error message.
Maybe see where config[:fetch_timeout]
is being set and make sure it contains a hash value like { timeout: 1 }
.
If you want to get your head around why you get that particular error message, consider this method:
def foo(a, test: 1)
puts test
end
Calling foo(1, 1)
will trigger a (wrong number of arguments (given 2, expected 1))
error, whereas foo(1, test: 2)
will work.