actually repeat the check once every 5 minutes just to be sure.
also because the stream doesn't cover outgoing payments.
This commit is contained in:
parent
7e4a42e7ff
commit
8e62d9287d
1 changed files with 6 additions and 3 deletions
|
|
@ -66,10 +66,13 @@ async def invoice_listener(nursery):
|
||||||
|
|
||||||
async def check_pending_payments():
|
async def check_pending_payments():
|
||||||
await delete_expired_invoices()
|
await delete_expired_invoices()
|
||||||
|
while True:
|
||||||
for payment in await get_payments(complete=False, pending=True, exclude_uncheckable=True):
|
for payment in await get_payments(complete=False, pending=True, exclude_uncheckable=True):
|
||||||
print(" - checking pending", payment.checking_id)
|
print(" - checking pending", payment.checking_id)
|
||||||
await payment.check_pending()
|
await payment.check_pending()
|
||||||
|
|
||||||
|
await trio.sleep(60 * 5)
|
||||||
|
|
||||||
|
|
||||||
async def invoice_callback_dispatcher(checking_id: str):
|
async def invoice_callback_dispatcher(checking_id: str):
|
||||||
payment = await get_standalone_payment(checking_id)
|
payment = await get_standalone_payment(checking_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue