mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Improve invoice processing logging
This commit is contained in:
parent
25a7f7168f
commit
c744a81e4c
3 changed files with 13 additions and 3 deletions
|
@ -23,6 +23,9 @@ namespace :invoices do
|
|||
end
|
||||
|
||||
if incoming_transactions.any?
|
||||
log 'Got incoming transactions'
|
||||
log incoming_transactions
|
||||
|
||||
bank_statement = BankStatement.new(bank_code: Setting.registry_bank_code,
|
||||
iban: Setting.registry_iban)
|
||||
|
||||
|
@ -41,8 +44,15 @@ namespace :invoices do
|
|||
transaction.autobind_invoice
|
||||
end
|
||||
end
|
||||
else
|
||||
log 'Got no incoming transactions parsed, aborting'
|
||||
end
|
||||
|
||||
puts "Transactions processed: #{incoming_transactions.size}"
|
||||
end
|
||||
|
||||
def log(msg)
|
||||
@log ||= Logger.new(STDOUT)
|
||||
@log.info(msg)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue