(self, command: commands.ReceiveResultCommand)
Client wishes to receive a result from a worker
Client wishes to receive a result from a worker
Client wishes to receive a result from a worker
async def handle_receive_result(self, command: commands.ReceiveResultCommand):
        """Client wishes to receive a result from a worker"""

        # TODO: rpc_timeout is in three different places in the config!
        #       Fix this. Really it makes most sense for the use if it goes on the
        #       ApiConfig rather than having to repeat it on both the result & RPC
        #       transports.
        timeout = command.options.get(
            "timeout", self.config.api(command.message.api_name).rpc_timeout
        )
        result_transport = self.transport_registry.get_result_transport(command.message.api_name)

        logger.debug("Starting RPC result listener")
        task = asyncio.ensure_future(
            queue_exception_checker(
                self._result_listener(
                    result_transport=result_transport,
                    timeout=timeout,
                    rpc_message=command.message,
                    return_path=command.message.return_path,
                    options=command.options,
                    result_queue=command.destination_queue,
                ),
                self.error_queue,
            )
        )
        self.listener_tasks.add(task)
async def handle_receive_result ( self , command : commands . ReceiveResultCommand ) : # TODO: rpc_timeout is in three different places in the config! #       Fix this. Really it makes most sense for the use if it goes on the #       ApiConfig rather than having to repeat it on both the result & RPC #       transports. timeout = command . options . get ( "timeout" , self . config . api ( command . message . api_name ) . rpc_timeout ) result_transport = self . transport_registry . get_result_transport ( command . message . api_name ) logger . debug ( "Starting RPC result listener" ) task = asyncio . ensure_future ( queue_exception_checker ( self . _result_listener ( result_transport = result_transport , timeout = timeout , rpc_message = command . message , return_path = command . message . return_path , options = command . options , result_queue = command . destination_queue , ) , self . error_queue , ) ) self . listener_tasks . add ( task )