Show More
@@ -218,7 +218,9 b' class KernelApp(BaseIPythonApplication):' | |||
|
218 | 218 | self.stdin_socket = context.socket(zmq.ROUTER) |
|
219 | 219 | self.stdin_port = self._bind_socket(self.stdin_socket, self.stdin_port) |
|
220 | 220 | self.log.debug("stdin ROUTER Channel on port: %i"%self.stdin_port) |
|
221 |
|
|
|
221 | ||
|
222 | def init_heartbeat(self): | |
|
223 | """start the heart beating""" | |
|
222 | 224 | # heartbeat doesn't share context, because it mustn't be blocked |
|
223 | 225 | # by the GIL, which is accessed by libzmq when freeing zero-copy messages |
|
224 | 226 | hb_ctx = zmq.Context() |
@@ -230,7 +232,9 b' class KernelApp(BaseIPythonApplication):' | |||
|
230 | 232 | # Helper to make it easier to connect to an existing kernel. |
|
231 | 233 | # set log-level to critical, to make sure it is output |
|
232 | 234 | self.log.critical("To connect another client to this kernel, use:") |
|
233 |
|
|
|
235 | ||
|
236 | def log_connection_info(self): | |
|
237 | """display connection info, and store ports""" | |
|
234 | 238 | basename = os.path.basename(self.connection_file) |
|
235 | 239 | if basename == self.connection_file or \ |
|
236 | 240 | os.path.dirname(self.connection_file) == self.profile_dir.security_dir: |
@@ -292,7 +296,9 b' class KernelApp(BaseIPythonApplication):' | |||
|
292 | 296 | self.init_session() |
|
293 | 297 | self.init_poller() |
|
294 | 298 | self.init_sockets() |
|
295 | # writing connection file must be *after* init_sockets | |
|
299 | self.init_heartbeat() | |
|
300 | # writing/displaying connection info must be *after* init_sockets/heartbeat | |
|
301 | self.log_connection_info() | |
|
296 | 302 | self.write_connection_file() |
|
297 | 303 | self.init_io() |
|
298 | 304 | self.init_signal() |
General Comments 0
You need to be logged in to leave comments.
Login now