mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Merge pull request #1715 from internetee/1712-improve-lhv-logging
Improve invoice processing logging
This commit is contained in:
commit
a2e7869678
2 changed files with 11 additions and 1 deletions
|
@ -45,7 +45,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: https://github.com/internetee/lhv.git
|
||||
revision: 1825240b3bf8b262418cc6c8ef7ed1aba386dd7d
|
||||
revision: 1fb07818369425510a0172ad53bc86e85b6f83cc
|
||||
branch: master
|
||||
specs:
|
||||
lhv (0.1.0)
|
||||
|
|
|
@ -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