From c88f05c5c0fb71896eeda0a922e6cacfcf887a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Wed, 21 Feb 2024 08:01:43 +0100 Subject: [PATCH] refactor: tasks should be run with internal wrapper listeners used did not use the helper function --- lnbits/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnbits/tasks.py b/lnbits/tasks.py index e5ee72f61..e45328a3b 100644 --- a/lnbits/tasks.py +++ b/lnbits/tasks.py @@ -87,7 +87,7 @@ async def internal_invoice_listener(): while True: checking_id = await internal_invoice_queue.get() 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(): @@ -100,7 +100,7 @@ async def invoice_listener(): WALLET = get_wallet_class() async for checking_id in WALLET.paid_invoices_stream(): 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():