invoices: more verbose logging for startup invoice GC
This commit is contained in:
parent
adbcc3f7a3
commit
ec50f2ccce
@ -213,8 +213,15 @@ func (i *InvoiceRegistry) scanInvoicesOnStart() error {
|
|||||||
len(pending))
|
len(pending))
|
||||||
i.expiryWatcher.AddInvoices(pending...)
|
i.expiryWatcher.AddInvoices(pending...)
|
||||||
|
|
||||||
if err := i.cdb.DeleteInvoice(removable); err != nil {
|
if len(removable) > 0 {
|
||||||
log.Warnf("Deleting old invoices failed: %v", err)
|
log.Infof("Attempting to delete %v canceled invoices",
|
||||||
|
len(removable))
|
||||||
|
if err := i.cdb.DeleteInvoice(removable); err != nil {
|
||||||
|
log.Warnf("Deleting canceled invoices failed: %v", err)
|
||||||
|
} else {
|
||||||
|
log.Infof("Deleted %v canceled invoices",
|
||||||
|
len(removable))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user