Skip to content

Commit c1a3e63

Browse files
rluodevgaryhtou
andauthored
Update app/jobs/invoice/mark_depositeds_job.rb
Co-authored-by: Gary Tou <[email protected]>
1 parent a54f54a commit c1a3e63

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/jobs/invoice/mark_depositeds_job.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ class Invoice
44
class MarkDepositedsJob < ApplicationJob
55
queue_as :default
66
def perform
7-
Invoice.where(aasm_state: :paid_v2).find_in_batches(batch_size: 100) do |batch|
8-
batch.each do |invoice|
9-
if invoice.canonical_transactions.count >= 2 || invoice.manually_marked_as_paid? || invoice.completed_deprecated?
10-
invoice.mark_deposited!
11-
end
7+
Invoice.where(aasm_state: :paid_v2).find_each do |invoice|
8+
if invoice.canonical_transactions.count >= 2 || invoice.manually_marked_as_paid? || invoice.completed_deprecated?
9+
invoice.mark_deposited!
1210
end
1311
end
1412
end

0 commit comments

Comments
 (0)