Skip to content

Commit

Permalink
(fix) regresion on PaymentScheduleItemWorker from v6.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nflorentin committed Nov 23, 2023
1 parent b2c3851 commit 2250427
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions app/workers/payment_schedule_item_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ class PaymentScheduleItemWorker
include Sidekiq::Worker

def perform(record_id = nil)
p "WORKER CURRENCY_LOCALE=#{CURRENCY_LOCALE}"
# if record_id
# psi = PaymentScheduleItem.find(record_id)
# check_item(psi)
# else
# PaymentScheduleItem.where.not(state: 'paid').where('due_date < ?', Time.current).each do |item|
# check_item(item)
# end
# end
if record_id
psi = PaymentScheduleItem.find(record_id)
check_item(psi)
else
PaymentScheduleItem.where.not(state: 'paid').where('due_date < ?', Time.current).each do |item|
check_item(item)
end
end
end

# @param psi [PaymentScheduleItem]
Expand Down

0 comments on commit 2250427

Please sign in to comment.