mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-18 11:31:41 +02:00
refactor: tasks should be run with internal wrapper
listeners used did not use the helper function
This commit is contained in:
@@ -87,7 +87,7 @@ async def internal_invoice_listener():
|
|||||||
while True:
|
while True:
|
||||||
checking_id = await internal_invoice_queue.get()
|
checking_id = await internal_invoice_queue.get()
|
||||||
logger.info("> got internal payment notification", checking_id)
|
logger.info("> got internal payment notification", checking_id)
|
||||||
asyncio.create_task(invoice_callback_dispatcher(checking_id))
|
create_task(invoice_callback_dispatcher(checking_id))
|
||||||
|
|
||||||
|
|
||||||
async def invoice_listener():
|
async def invoice_listener():
|
||||||
@@ -100,7 +100,7 @@ async def invoice_listener():
|
|||||||
WALLET = get_wallet_class()
|
WALLET = get_wallet_class()
|
||||||
async for checking_id in WALLET.paid_invoices_stream():
|
async for checking_id in WALLET.paid_invoices_stream():
|
||||||
logger.info("> got a payment notification", checking_id)
|
logger.info("> got a payment notification", checking_id)
|
||||||
asyncio.create_task(invoice_callback_dispatcher(checking_id))
|
create_task(invoice_callback_dispatcher(checking_id))
|
||||||
|
|
||||||
|
|
||||||
async def check_pending_payments():
|
async def check_pending_payments():
|
||||||
|
Reference in New Issue
Block a user