lib/mission_control/jobs/server.rb in mission_control-jobs-0.3.3 vs lib/mission_control/jobs/server.rb in mission_control-jobs-0.4.0

- old
+ new

@@ -2,15 +2,16 @@ class MissionControl::Jobs::Server include MissionControl::Jobs::IdentifiedByName include Serializable, RecurringTasks, Workers - attr_reader :name, :queue_adapter, :application + attr_reader :name, :queue_adapter, :application, :backtrace_cleaner - def initialize(name:, queue_adapter:, application:) + def initialize(name:, queue_adapter:, application:, backtrace_cleaner: nil) super(name: name) @queue_adapter = queue_adapter @application = application + @backtrace_cleaner = backtrace_cleaner || MissionControl::Jobs.backtrace_cleaner end def activating(&block) previous_adapter = ActiveJob::Base.current_queue_adapter ActiveJob::Base.current_queue_adapter = queue_adapter