(self, *, event: WebhookEvent)
add :event: to webhook queue
add :event: to webhook queue
add : event : to webhook queue
async def enqueue(self, *, event: WebhookEvent) -> None:
        """
        add :event: to webhook queue
        """
        queue_name = get_webhook_queue_name(event)
        transaction = await self.connection.multi()
        await transaction.sadd(WEBHOOK_QUEUE_NAMES, [queue_name])
        await transaction.zadd(
            queue_name, {event.json(): time.time()}, only_if_not_exists=True
        )
        await transaction.exec()
        log = logger.bind(
            owner=event.repo_owner,
            repo=event.repo_name,
            number=event.pull_request_number,
            install=event.installation_id,
        )
        log.info("enqueue webhook event")
        self.start_webhook_worker(queue_name=queue_name)
async def enqueue ( self , * , event : WebhookEvent ) -> None : queue_name = get_webhook_queue_name ( event ) transaction = await self . connection . multi ( ) await transaction . sadd ( WEBHOOK_QUEUE_NAMES , [ queue_name ] ) await transaction . zadd ( queue_name , { event . json ( ) : time . time ( ) } , only_if_not_exists = True ) await transaction . exec ( ) log = logger . bind ( owner = event . repo_owner , repo = event . repo_name , number = event . pull_request_number , install = event . installation_id , ) log . info ( "enqueue webhook event" ) self . start_webhook_worker ( queue_name = queue_name )