lib/reactor/workers/concerns/configuration.rb in reactor-0.19.0 vs lib/reactor/workers/concerns/configuration.rb in reactor-1.0.0

- old
+ new

@@ -1,11 +1,11 @@ module Reactor module Workers module Configuration extend ActiveSupport::Concern - CONFIG = [:source, :action, :async, :delay, :deprecated] + CONFIG = [:source, :action, :delay, :deprecated] included do include Sidekiq::Worker class_attribute *CONFIG @@ -19,14 +19,12 @@ def perform_where_needed(data) if deprecated return elsif delay > 0 event_queue.perform_in(delay, data) - elsif async - event_queue.perform_async(data) else - new.perform(data) + event_queue.perform_async(data) end source end def event_queue @@ -49,14 +47,10 @@ action.call(event) end end def should_perform? - if Reactor.test_mode? - Reactor.test_mode_subscriber_enabled? source - else - true - end + true end private def raise_unconfigured! \ No newline at end of file