(
    *, queue_name: str, connection: RedisConnection
)
Worker for a repo given by :queue_name:

    Pull webhook events off redis queue and process for mergeability.

    We only run one of these per repo as we can only merge one PR at a time
    to be efficient. This also alleviates the need of locks.
Worker for a repo given by :queue_name:
Worker for a repo given by : queue_name :
async def repo_queue_consumer(
    *, queue_name: str, connection: RedisConnection
) -> typing.NoReturn:
    """
    Worker for a repo given by :queue_name:

    Pull webhook events off redis queue and process for mergeability.

    We only run one of these per repo as we can only merge one PR at a time
    to be efficient. This also alleviates the need of locks.
    """
    installation = installation_id_from_queue(queue_name)
    with sentry_sdk.Hub(sentry_sdk.Hub.current) as hub:
        with hub.configure_scope() as scope:
            scope.set_tag("queue", queue_name)
            scope.set_tag("installation", installation)
        log = logger.bind(queue=queue_name, install=installation)
        log.info("start repo_consumer")
        while True:
            await process_repo_queue(log, connection, queue_name)
async def repo_queue_consumer ( * , queue_name : str , connection : RedisConnection ) -> typing . NoReturn : installation = installation_id_from_queue ( queue_name ) with sentry_sdk . Hub ( sentry_sdk . Hub . current ) as hub : with hub . configure_scope ( ) as scope : scope . set_tag ( "queue" , queue_name ) scope . set_tag ( "installation" , installation ) log = logger . bind ( queue = queue_name , install = installation ) log . info ( "start repo_consumer" ) while True : await process_repo_queue ( log , connection , queue_name )