mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 12:56:16 +02:00
show progress (#987)
This commit is contained in:
@@ -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(
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user