Esempio n. 1
0
async def invoice_listener(nursery):
    async for checking_id in WALLET.paid_invoices_stream():
        nursery.start_soon(invoice_callback_dispatcher, checking_id)
Esempio n. 2
0
async def invoice_listener():
    async with trio.open_nursery() as nursery:
        async for checking_id in WALLET.paid_invoices_stream():
            nursery.start_soon(invoice_callback_dispatcher, checking_id)
Esempio n. 3
0
async def invoice_listener():
    async for checking_id in WALLET.paid_invoices_stream():
        await run_on_pseudo_request(invoice_callback_dispatcher, checking_id)
Esempio n. 4
0
async def invoice_listener():
    async for checking_id in WALLET.paid_invoices_stream():
        print("> got a payment notification", checking_id)
        current_app.nursery.start_soon(invoice_callback_dispatcher,
                                       checking_id)