print time of expiration (#952)
This commit is contained in:
+3
-1
@@ -336,7 +336,9 @@ async def delete_expired_invoices(
|
|||||||
expiration_date = datetime.datetime.fromtimestamp(invoice.date + invoice.expiry)
|
expiration_date = datetime.datetime.fromtimestamp(invoice.date + invoice.expiry)
|
||||||
if expiration_date > datetime.datetime.utcnow():
|
if expiration_date > datetime.datetime.utcnow():
|
||||||
continue
|
continue
|
||||||
logger.debug(f"Deleting expired invoice: {invoice.payment_hash}")
|
logger.debug(
|
||||||
|
f"Deleting expired invoice: {invoice.payment_hash} (expired: {expiration_date})"
|
||||||
|
)
|
||||||
await (conn or db).execute(
|
await (conn or db).execute(
|
||||||
"""
|
"""
|
||||||
DELETE FROM apipayments
|
DELETE FROM apipayments
|
||||||
|
|||||||
+1
-2
@@ -102,12 +102,11 @@ async def check_pending_payments():
|
|||||||
exclude_uncheckable=True,
|
exclude_uncheckable=True,
|
||||||
conn=conn,
|
conn=conn,
|
||||||
)
|
)
|
||||||
logger.debug(f"Task: checking {len(pending_payments)} pending payments")
|
|
||||||
for payment in pending_payments:
|
for payment in pending_payments:
|
||||||
await payment.check_status()
|
await payment.check_status()
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"Task: pending payments check finished (took {time.time() - start_time:0.3f} s)"
|
f"Task: pending check finished for {len(pending_payments)} payments (took {time.time() - start_time:0.3f} s)"
|
||||||
)
|
)
|
||||||
# we delete expired invoices once upon the first pending check
|
# we delete expired invoices once upon the first pending check
|
||||||
if incoming:
|
if incoming:
|
||||||
|
|||||||
Reference in New Issue
Block a user