Skip to content

Commit

Permalink
Set Worker's bid when using Sidekiq::Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikz committed May 13, 2015
1 parent 19ef472 commit 8cd70cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sidekiq/testing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def drain
while job = jobs.shift do
worker = new
worker.jid = job['jid']
worker.bid = job['bid'] if worker.respond_to?(:bid=)
execute_job(worker, job['args'])
end
end
Expand All @@ -162,6 +163,7 @@ def perform_one
job = jobs.shift
worker = new
worker.jid = job['jid']
worker.bid = job['bid'] if worker.respond_to?(:bid=)
execute_job(worker, job['args'])
end

Expand Down

0 comments on commit 8cd70cf

Please sign in to comment.