(
        self, rpc_message: RpcMessage, return_path: str, options: dict
    )
return result_message
Await a result from the processing worker
Await a result from the processing worker
Await a result from the processing worker
async def receive_result(
        self, rpc_message: RpcMessage, return_path: str, options: dict
    ) -> ResultMessage:
        """Await a result from the processing worker"""
        logger.debug(L("Awaiting Redis result for RPC message: {}", Bold(rpc_message)))
        redis_key = self._parse_return_path(return_path)

        with await self.connection_manager() as redis:
            start_time = time.time()
            result = None
            while not result:
                # Sometimes blpop() will return None in the case of timeout or
                # cancellation. We therefore perform this step with a loop to catch
                # this. A more elegant solution is welcome.
                # TODO: RPC & result Transports should not be applying a timeout, leave
                #       this to the client which coordinates between the two
                result = await redis.blpop(redis_key, timeout=self.rpc_timeout)
            _, serialized = result

        result_message = self.deserializer(
            serialized, api_name=rpc_message.api_name, procedure_name=rpc_message.procedure_name
        )

        logger.debug(
            L(
                "⬅ Received Redis result in {} for RPC message {}: {}",
                human_time(time.time() - start_time),
                rpc_message,
                Bold(result_message.result),
            )
        )

        return result_message
async def receive_result ( self , rpc_message : RpcMessage , return_path : str , options : dict ) -> ResultMessage : logger . debug ( L ( "Awaiting Redis result for RPC message: {}" , Bold ( rpc_message ) ) ) redis_key = self . _parse_return_path ( return_path ) with await self . connection_manager ( ) as redis : start_time = time . time ( ) result = None while not result : # Sometimes blpop() will return None in the case of timeout or # cancellation. We therefore perform this step with a loop to catch # this. A more elegant solution is welcome. # TODO: RPC & result Transports should not be applying a timeout, leave #       this to the client which coordinates between the two result = await redis . blpop ( redis_key , timeout = self . rpc_timeout ) _ , serialized = result result_message = self . deserializer ( serialized , api_name = rpc_message . api_name , procedure_name = rpc_message . procedure_name ) logger . debug ( L ( "⬅ Received Redis result in {} for RPC message {}: {}", human_time ( time . time ( ) - start_time ) , rpc_message , Bold ( result_message . result ) , ) ) return result_message