Closed jpaas closed 1 year ago
Would you mind showing the code that cause this error?
>> RedisClient.new.call("SADD", "set", ["a", "b"])
=> 2
The above works just fine, so I assume you have deeply nested arrays? If so they're rejected on purpose.
Its coming from sidekiq-batch
on this line
https://github.com/breamware/sidekiq-batch/blob/master/lib/sidekiq/batch.rb#L99
Oh maybe you're right. They might be placing their array of job ids in an array. In fact they made this change recently on Sep 28.
https://github.com/breamware/sidekiq-batch/commit/6c4ca7e0cb9a93e7ec3f28330a8580c995d380fe
Yup, they should flatten that.
The reason I don't want to allow nested arrays is that most of the time it's not intended. redis-client
tries to be strict to avoid silent issues.
Thanks @casperisfine. I'll take this up with sidekiq-batch
Using 0.11.2 when using the
SADD
command, if I pass an array as an argument I get this error: Unsupported command argument type: Array because he argument validation in command_builder does not allow this.Fix is trivial. PR to follow.