Closed djberg96 closed 5 months ago
Sorry I'm not super familiar with Sidekiq, but what happens if you change it to:
Sidekiq.redis.multi do |conn|
conn.zadd('dead', now, payload)
conn.zremrangebyscore('dead', '-inf', now - Sidekiq::DeadSet.timeout)
conn.zremrangebyrank('dead', 0, -Sidekiq::DeadSet.max_jobs)
end
@PatrickTulskie Didn't like it, apparently the .redis
method requires a block, so that raises an error.
@PatrickTulskie However, this does appear to fix it:
Sidekiq.redis do |conn|
conn.multi do |pipeline|
pipeline.zadd('dead', now, payload)
pipeline.zremrangebyscore('dead', '-inf', now - Sidekiq::DeadSet.timeout)
pipeline.zremrangebyrank('dead', 0, -Sidekiq::DeadSet.max_jobs)
end
end
Gonna go ahead and close this since I have a fix. Sorry for the noise, and thanks for the assist @PatrickTulskie.
Ahh gotcha. That was going to be my next suggestion. Glad you got it fixed @djberg96
Well, upon further review, making that change caused some obscure failures in our middleware stack, but the error message doesn't make it clear what the issue was. FWIW, that send_to_morgue
code was largely borrowed from their send_to_morgue method which still doesn't use the pipelining.
I guess we'll have to swallow these with Redis.silence_deprecations
.
I'm seeing the following warning message from redis-namespace:
I can replicate it like so:
This method seems to be the code in question from redis-namespace that triggers it:
Can this be fixed? Or should I just silence it?