lib/good_job/lockable.rb in good_job-2.4.1 vs lib/good_job/lockable.rb in good_job-2.4.2

- old
+ new

@@ -147,10 +147,10 @@ def with_advisory_lock(column: _advisory_lockable_column, function: advisory_lockable_function, unlock_session: false) raise ArgumentError, "Must provide a block" unless block_given? records = advisory_lock(column: column, function: function).to_a begin - yield(records) + unscoped { yield(records) } ensure if unlock_session advisory_unlock_session else records.each do |record|