yield event loop when processing multiple invoices (#46)
This commit is contained in:
parent
11cfbe8772
commit
9674110d04
1 changed files with 2 additions and 0 deletions
2
tasks.py
2
tasks.py
|
|
@ -231,6 +231,7 @@ async def _on_multi_pay_invoice(
|
||||||
results.append(r)
|
results.append(r)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
results.append((None, {"code": "INTERNAL", "message": str(e)}, []))
|
results.append((None, {"code": "INTERNAL", "message": str(e)}, []))
|
||||||
|
await asyncio.sleep(0)
|
||||||
# await log_nwc(pubkey, payload)
|
# await log_nwc(pubkey, payload)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
@ -440,6 +441,7 @@ async def _on_list_transactions(
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
await asyncio.sleep(0)
|
||||||
# await log_nwc(pubkey, payload)
|
# await log_nwc(pubkey, payload)
|
||||||
return [({"transactions": transactions}, None, [])]
|
return [({"transactions": transactions}, None, [])]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue