示例#1
0
 def _real_fanout(self, method_name,value):
     try:
         rpc.fanout_cast(self.context, self._get_routing_key(),
                  {"method": method_name, "args": value})
     except Exception as e:
         LOG.error(e)
         raise exception.TaskManagerError(original_message=str(e))
示例#2
0
文件: proxy.py 项目: dfecker/trove
    def fanout_cast(self, context, msg, topic=None, version=None):
        """rpc.fanout_cast() a remote method.

        :param context: The request context
        :param msg: The message to send, including the method and args.
        :param topic: Override the topic for this message.
        :param version: (Optional) Override the requested API version in this
               message.

        :returns: None.  rpc.fanout_cast() does not wait on any return value
                  from the remote method.
        """
        self._set_version(msg, version)
        rpc.fanout_cast(context, self._get_topic(topic), msg)
示例#3
0
文件: proxy.py 项目: vdialani/trove
    def fanout_cast(self, context, msg, topic=None, version=None):
        """rpc.fanout_cast() a remote method.

        :param context: The request context
        :param msg: The message to send, including the method and args.
        :param topic: Override the topic for this message.
        :param version: (Optional) Override the requested API version in this
               message.

        :returns: None.  rpc.fanout_cast() does not wait on any return value
                  from the remote method.
        """
        self._set_version(msg, version)
        msg['args'] = self._serialize_msg_args(context, msg['args'])
        rpc.fanout_cast(context, self._get_topic(topic), msg)