##// END OF EJS Templates
Merge pull request #1312 from minrk/hb...
Min RK -
r5954:1487f2f1 merge
parent child Browse files
Show More
@@ -481,6 +481,8 b' class IOPubHandler(AuthenticatedZMQStreamHandler):'
481 if self._kernel_alive:
481 if self._kernel_alive:
482 self._kernel_alive = False
482 self._kernel_alive = False
483 self.hb_stream.send(b'ping')
483 self.hb_stream.send(b'ping')
484 # flush stream to force immediate socket send
485 self.hb_stream.flush()
484 else:
486 else:
485 try:
487 try:
486 callback()
488 callback()
@@ -64,7 +64,7 b' class HeartMonitor(LoggingConfigurable):'
64 pongstream: an XREP stream
64 pongstream: an XREP stream
65 period: the period of the heartbeat in milliseconds"""
65 period: the period of the heartbeat in milliseconds"""
66
66
67 period = Integer(1000, config=True,
67 period = Integer(3000, config=True,
68 help='The frequency at which the Hub pings the engines for heartbeats '
68 help='The frequency at which the Hub pings the engines for heartbeats '
69 '(in ms)',
69 '(in ms)',
70 )
70 )
@@ -124,6 +124,8 b' class HeartMonitor(LoggingConfigurable):'
124 # print self.on_probation, self.hearts
124 # print self.on_probation, self.hearts
125 # self.log.debug("heartbeat::beat %.3f, %i beating hearts", self.lifetime, len(self.hearts))
125 # self.log.debug("heartbeat::beat %.3f, %i beating hearts", self.lifetime, len(self.hearts))
126 self.pingstream.send(asbytes(str(self.lifetime)))
126 self.pingstream.send(asbytes(str(self.lifetime)))
127 # flush stream to force immediate socket send
128 self.pingstream.flush()
127
129
128 def handle_new_heart(self, heart):
130 def handle_new_heart(self, heart):
129 if self._new_handlers:
131 if self._new_handlers:
General Comments 0
You need to be logged in to leave comments. Login now