lib/eventsimple/reactor_worker.rb in eventsimple-1.0.0 vs lib/eventsimple/reactor_worker.rb in eventsimple-1.1.0
- old
+ new
@@ -1,7 +1,8 @@
# frozen_string_literal: true
+# legacy worker for backwards compatibility when upgrading from Eventsimple <= 1.0.0
module Eventsimple
class ReactorWorker
include Sidekiq::Worker
def perform(event_global_id, reactor_class)
@@ -10,9 +11,9 @@
end
rescue ActiveRecord::RecordNotFound
Rails.logger.error("Event #{event_global_id} not found for reactor: #{reactor_class}")
else
reactor = reactor_class.constantize
- reactor.new(event).call
+ reactor.new.call(event)
end
end
end