Skip to content

Commit

Permalink
Merge pull request #44 from controlshift/redis-deprecation-warnings
Browse files Browse the repository at this point in the history
Fix redis deprecation warnings
  • Loading branch information
gzigzigzeo authored Jul 15, 2022
2 parents 83fe59c + ed169b5 commit 14aaf1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/sidekiq/grouping.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "active_support"
require "active_support/core_ext/string"
require "active_support/configurable"
require "active_support/core_ext/numeric/time"
Expand Down
8 changes: 4 additions & 4 deletions lib/sidekiq/grouping/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class Redis

def push_msg(name, msg, remember_unique = false)
redis do |conn|
conn.multi do
conn.sadd(ns('batches'), name)
conn.rpush(ns(name), msg)
conn.sadd(unique_messages_key(name), msg) if remember_unique
conn.multi do |pipeline|
pipeline.sadd(ns('batches'), name)
pipeline.rpush(ns(name), msg)
pipeline.sadd(unique_messages_key(name), msg) if remember_unique
end
end
end
Expand Down

0 comments on commit 14aaf1c

Please sign in to comment.