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 committed Oct 25, 2022
1 parent 1b2244d commit ea97b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sidekiq/grouping/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ 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
pipeline.sadd?(unique_messages_key(name), msg) if remember_unique
end
end
end
Expand Down

0 comments on commit ea97b2d

Please sign in to comment.