Пример #1
0
def seed(msg=None):
    common_config = yaml.load(file('config.yaml'))
    client = node.makeNode({'type': common_config['type'], 'uri': actor_config1['uri'], 'role': 'client'})
    if not msg:
        codec = message.makeCodec({'type': 'jsonrpc'})
        msg = codec.dumps(message.makeMessage({'type': 'test'}))
    client.connect()
    logging.debug('seed: connected to forwarder node')
    client.send(msg)
    logging.debug('seed: message sent')
    logging.debug('seed: message received (%s)' % client.recv())
Пример #2
0
 def __init__(self, config):
     node.Actor.__init__(self, config)
     self._queue = node.makeNode(redispub_conf)
     self._queue.start()
Пример #3
0
 def __init__(self, config):
     node.Actor.__init__(self, config)
     self._queue = node.makeNode(redispub_conf)
     self._queue.start()