show progress (#987)

This commit is contained in:
calle 2022-10-11 08:52:39 +02:00 committed by GitHub
parent 3bf3c91007
commit d1302e4868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -333,7 +333,7 @@ async def delete_expired_invoices(
""" """
) )
logger.debug(f"Checking expiry of {len(rows)} invoices") logger.debug(f"Checking expiry of {len(rows)} invoices")
for (payment_request,) in rows: for i, (payment_request,) in enumerate(rows):
try: try:
invoice = bolt11.decode(payment_request) invoice = bolt11.decode(payment_request)
except: except:
@ -343,7 +343,7 @@ async def delete_expired_invoices(
if expiration_date > datetime.datetime.utcnow(): if expiration_date > datetime.datetime.utcnow():
continue continue
logger.debug( logger.debug(
f"Deleting expired invoice: {invoice.payment_hash} (expired: {expiration_date})" f"Deleting expired invoice {i}/{len(rows)}: {invoice.payment_hash} (expired: {expiration_date})"
) )
await (conn or db).execute( await (conn or db).execute(
""" """