async def send_rpc_command(self, short_name, rpc_id, payload, sender_client, timeout=1.0):
        """Send an RPC to a service using its registered agent.

        Args:
            short_name (str): The name of the service we would like to send
                and RPC to
            rpc_id (int): The rpc id that we would like to call
            payload (bytes): The raw bytes that we would like to send as an
                argument
            sender_client (str): The uuid of the sending client
            timeout (float): The maximum number of seconds before we signal a timeout
                of the RPC

        Returns:
            str: A unique id that can used to identify the notified response of this
                RPC.
        """


        rpc_tag = str(uuid.uuid4())

        self.rpc_results.declare(rpc_tag)

        if short_name in self.services and short_name in self.agents:
            agent_tag = self.agents[short_name]
            rpc_message = {
                'rpc_id': rpc_id,
                'payload': payload,
                'response_uuid': rpc_tag
            }

            self.in_flight_rpcs[rpc_tag] = InFlightRPC(sender_client, short_name,
                                                       monotonic(), timeout)
            await self._notify_update(short_name, 'rpc_command', rpc_message, directed_client=agent_tag)
        else:
            response = dict(result='service_not_found', response=b'')
            self.rpc_results.set(rpc_tag, response)

        return rpc_tag
async def send_rpc_command ( self , short_name , rpc_id , payload , sender_client , timeout = 1.0 ) : rpc_tag = str ( uuid . uuid4 ( ) ) self . rpc_results . declare ( rpc_tag ) if short_name in self . services and short_name in self . agents : agent_tag = self . agents [ short_name ] rpc_message = { 'rpc_id' : rpc_id , 'payload' : payload , 'response_uuid' : rpc_tag } self . in_flight_rpcs [ rpc_tag ] = InFlightRPC ( sender_client , short_name , monotonic ( ) , timeout ) await self . _notify_update ( short_name , 'rpc_command' , rpc_message , directed_client = agent_tag ) else : response = dict ( result = 'service_not_found' , response = b'' ) self . rpc_results . set ( rpc_tag , response ) return rpc_tag
Send an RPC to a service using its registered agent.

        Args:
            short_name (str): The name of the service we would like to send
                and RPC to
            rpc_id (int): The rpc id that we would like to call
            payload (bytes): The raw bytes that we would like to send as an
                argument
            sender_client (str): The uuid of the sending client
            timeout (float): The maximum number of seconds before we signal a timeout
                of the RPC

        Returns:
            str: A unique id that can used to identify the notified response of this
                RPC.