Permalink
Browse files

Merge pull request #1496 from mperham/feature/multi-to-mget

Removes unnecessary transaction.
  • Loading branch information...
2 parents 339e679 + b530d59 commit 7190f1068c749b22315d520db6c36272a19d12fa @mperham committed Feb 18, 2014
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/sidekiq/api.rb
View
@@ -420,10 +420,7 @@ def each(&block)
Sidekiq.redis do |conn|
workers = conn.smembers("workers")
workers.each do |w|
- msg, time = conn.multi do
- conn.get("worker:#{w}")
- conn.get("worker:#{w}:started")
- end
+ msg, time = conn.mget("worker:#{w}", "worker:#{w}:started")
next unless msg
block.call(w, Sidekiq.load_json(msg), time)
end

0 comments on commit 7190f10

Please sign in to comment.