Skip to content

Commit

Permalink
Use sadd? to avoid Redis warning
Browse files Browse the repository at this point in the history
Avoids: Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead.
  • Loading branch information
jaredmoody authored Oct 25, 2022
1 parent 1b2244d commit 01c2e1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sidekiq/grouping/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Redis
def push_msg(name, msg, remember_unique = false)
redis do |conn|
conn.multi do |pipeline|
pipeline.sadd(ns("batches"), name)
pipeline.sadd?(ns("batches"), name)
pipeline.rpush(ns(name), msg)
pipeline.sadd(unique_messages_key(name), msg) if remember_unique
end
Expand Down

0 comments on commit 01c2e1d

Please sign in to comment.