Skip to content

Commit

Permalink
Don't memoize interruption adapter
Browse files Browse the repository at this point in the history
Some tests rely on changing the interruption adapter mid-execution to test specific behaviour. We shouldn't break that with this feature.
  • Loading branch information
Mangara committed Feb 8, 2024
1 parent 6ba201d commit e28ecc3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/job-iteration/iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,8 +121,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)
Expand Down

0 comments on commit e28ecc3

Please sign in to comment.