INNER CODE UNIT · Python

build_rq_channel_pool

SamWarden/user_service · src/user_service/infrastructure/message_broker/main.py:22

async def build_rq_channel_pool(
    rq_connection_pool: Pool[aio_pika.abc.AbstractConnection],
) -> AsyncGenerator[Pool[aio_pika.abc.AbstractChannel], None]:
    rq_channel_pool = Pool(ChannelFactory(rq_connection_pool).get_channel, max_size=100)
    async with rq_channel_pool:
        yield rq_channel_pool

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…