app/repositories/lightning.py
async def register_lightning_listener():
    """
    Registers all lightning listeners

    By calling get_ln_info_impl() once, we ensure that wallet is unlocked.
    Implementation will throw HTTPException with status_code 423_LOCKED if otherwise.
    It is the task of the caller to call register_lightning_listener() again
    """

    try:
        await get_ln_info_impl()

        loop = asyncio.get_event_loop()
        loop.create_task(_handle_info_listener())
        loop.create_task(_handle_invoice_listener())
    except HTTPException as r:
        raise
    except NotImplementedError as r:
        raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=r.args[0])

    Registers all lightning listeners

    By calling get_ln_info_impl() once, we ensure that wallet is unlocked.
    Implementation will throw HTTPException with status_code 423_LOCKED if otherwise.
    It is the task of the caller to call register_lightning_listener() again
    
Registers all lightning listeners
By calling get_ln_info_impl() once, we ensure that wallet is unlocked.
Registers all lightning listeners By calling get_ln_info_impl () once we ensure that wallet is unlocked .
async def register_lightning_listener():
    try:
        await get_ln_info_impl()
        loop = asyncio.get_event_loop()
        loop.create_task(_handle_info_listener())
        loop.create_task(_handle_invoice_listener())
    except HTTPException as r:
        raise
    except NotImplementedError as r:
        raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=r.args[0])
async def register_lightning_listener ( ) : try : await get_ln_info_impl ( ) loop = asyncio . get_event_loop ( ) loop . create_task ( _handle_info_listener ( ) ) loop . create_task ( _handle_invoice_listener ( ) ) except HTTPException as r : raise except NotImplementedError as r : raise HTTPException ( status . HTTP_501_NOT_IMPLEMENTED , detail = r . args [ 0 ] )
Registers all lightning listeners
By calling get_ln_info_impl() once, we ensure that wallet is unlocked.
Registers all lightning listeners By calling get_ln_info_impl () once we ensure that wallet is unlocked .
"""
    Registers all lightning listeners

    By calling get_ln_info_impl() once, we ensure that wallet is unlocked.
    Implementation will throw HTTPException with status_code 423_LOCKED if otherwise.
    It is the task of the caller to call register_lightning_listener() again
    """