yield event loop when processing multiple invoices (#46)

This commit is contained in:
Riccardo Balbo 2026-06-19 01:31:56 +02:00 • committed by GitHub
commit 9674110d04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -231,6 +231,7 @@ async def _on_multi_pay_invoice(
results.append(r)
except Exception as e:
results.append((None, {"code": "INTERNAL", "message": str(e)}, []))
await asyncio.sleep(0)
# await log_nwc(pubkey, payload)
return results
@ -440,6 +441,7 @@ async def _on_list_transactions(
"metadata": {},
}
)
await asyncio.sleep(0)
# await log_nwc(pubkey, payload)
return [({"transactions": transactions}, None, [])]