示例#1
0
 def send_fanout(self, target, context, message, retry=None):
     with contextlib.closing(
             zmq_request.FanoutRequest(target,
                                       context=context,
                                       message=message,
                                       retry=retry)) as request:
         self.fanout_publisher.send_request(request)
示例#2
0
 def _send_request(self, target):
     #  Needed only in test env to give listener a chance to connect
     #  before request fires
     time.sleep(1)
     with contextlib.closing(
             zmq_request.FanoutRequest(target,
                                       context={},
                                       message={'method': 'hello-world'},
                                       retry=None)) as request:
         self.publisher.send_request(
             [request.create_envelope(),
              pickle.dumps(request)])
示例#3
0
 def send_fanout(self, target, context, message, retry=None):
     request = zmq_request.FanoutRequest(target,
                                         context=context,
                                         message=message,
                                         retry=retry)
     self.fanout_publisher.send_fanout(request)