1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

A small but vital fix, self != current_actor

This commit is contained in:
Mike Perham 2012-01-26 13:02:47 -08:00
parent 922d5f8dbe
commit 1a03aa203f
2 changed files with 6 additions and 1 deletions

View file

@ -14,7 +14,7 @@ module Sidekiq
begin
klass = constantize(msg['class'])
klass.new.perform(*msg['args'])
@boss.processor_done!(self)
@boss.processor_done!(current_actor)
rescue => ex
send_to_airbrake(msg, ex) if defined?(::Airbrake)
raise ex

View file

@ -20,6 +20,11 @@ class TestProcessor < MiniTest::Unit::TestCase
msg = { 'class' => MockWorker.to_s, 'args' => ['myarg'] }
processor = ::Sidekiq::Processor.new(@boss)
@boss.expect(:processor_done!, nil, [processor])
class << processor
def current_actor
self
end
end
processor.process(msg)
@boss.verify
assert_equal 1, $invokes