def start(self, listener, watchdog=None): """ Start processing messages on the queue and forward to the listener. @param listener: A reply listener. @type listener: L{Listener} @param watchdog: An (optional) watchdog. @type watchdog: L{WatchDog} """ self.listener = listener self.watchdog = watchdog or LazyDog() self.blacklist = set() Consumer.start(self)
def test_init(self): url = 'test-url' node = Node('test-queue') # test consumer = Consumer(node, url) # validation self.assertEqual(consumer.node, node) self.assertEqual(consumer.url, url)
def __init__(self, url): queue = Queue(address.queue) Consumer.__init__(self, queue, url=url) self.received = 0
def __init__(self, url, uuid, port, host=HOST): Consumer.__init__(self, toq(uuid), url=url) self.uuid = uuid self.port = port self.host = host
def __init__(self, url): topic = Topic('heartbeat') Consumer.__init__(self, topic, url=url)