Skip to content

Commit 5a70d0f

Browse files
committed
This should not have been necessary
1 parent b5debf8 commit 5a70d0f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/models/solid_queue/batch_record.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,8 @@ def clear_unpreserved_jobs
130130

131131
def check_parent_completion!
132132
if parent_batch_id.present?
133-
# Use after_transaction to avoid issues with locked records
134-
ActiveRecord.after_all_transactions_commit do
135-
parent = BatchRecord.find_by(batch_id: parent_batch_id)
136-
parent&.check_completion! unless parent&.finished?
137-
end
133+
parent = BatchRecord.find_by(batch_id: parent_batch_id)
134+
parent&.check_completion! unless parent&.finished?
138135
end
139136
end
140137
end

0 commit comments

Comments
 (0)