diff --git a/lib/job-iteration/iteration.rb b/lib/job-iteration/iteration.rb index 731fddf3..aa064cbf 100644 --- a/lib/job-iteration/iteration.rb +++ b/lib/job-iteration/iteration.rb @@ -75,10 +75,6 @@ def around_iterate(&blk) set_callback(:iterate, :around, &blk) end - def interruption_adapter - JobIteration.interruption_adapter || JobIteration::InterruptionAdapters.lookup(queue_adapter_name) - end - private def ban_perform_definition @@ -93,7 +89,6 @@ def initialize(*arguments) self.times_interrupted = 0 self.total_time = 0.0 assert_implements_methods! - @interruption_adapter = self.class.interruption_adapter end ruby2_keywords(:initialize) if respond_to?(:ruby2_keywords, true) @@ -125,8 +120,9 @@ def retry_job(*, **) private - # @api private - attr_reader :interruption_adapter + def interruption_adapter # @private + JobIteration.interruption_adapter || JobIteration::InterruptionAdapters.lookup(queue_adapter_name) + end def enumerator_builder JobIteration.enumerator_builder.new(self)