Exempt a particular client name from heartbeats for testing

(imported from commit 3914130384a7a9854b006405ffd2fe379bbd090d)
This commit is contained in:
Zev Benjamin
2013-11-27 10:30:28 -05:00
parent c0a8fc459a
commit 9d0f801ad6

View File

@@ -130,7 +130,8 @@ class ClientDescriptor(object):
self.add_event(dict(type='heartbeat'))
ioloop = tornado.ioloop.IOLoop.instance()
heartbeat_time = time.time() + HEARTBEAT_MIN_FREQ_SECS + random.randint(0, 10)
self._timeout_handle = ioloop.add_timeout(heartbeat_time, timeout_callback)
if self.client_type.name != 'API: heartbeat test':
self._timeout_handle = ioloop.add_timeout(heartbeat_time, timeout_callback)
logging.info("DEBUG: connected handler for queue %s" % (self.event_queue.id,))
def disconnect_handler(self):