mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-06 16:01:37 -05:00
Update jupyter-client
to get rid off jupyter-connection-hb
This commit is contained in:
parent
d4d1e1e48c
commit
f627175f57
1 changed files with 9 additions and 10 deletions
|
@ -492,21 +492,20 @@ back."
|
|||
(jupyter-alive-p (jupyter-io kernel)))))
|
||||
|
||||
(cl-defmethod jupyter-hb-pause ((client jupyter-kernel-client))
|
||||
(with-slots (conn) client
|
||||
(when (jupyter-connection-hb conn)
|
||||
(jupyter-hb-pause (jupyter-connection-hb conn)))))
|
||||
(when-let* ((kernel (jupyter-kernel client))
|
||||
(hb (jupyter-send (jupyter-io kernel) 'hb)))
|
||||
(jupyter-hb-pause hb)))
|
||||
|
||||
(cl-defmethod jupyter-hb-unpause ((client jupyter-kernel-client))
|
||||
(with-slots (conn) client
|
||||
(when (jupyter-connection-hb conn)
|
||||
(jupyter-hb-pause (jupyter-connection-hb conn)))))
|
||||
(when-let* ((kernel (jupyter-kernel client))
|
||||
(hb (jupyter-send (jupyter-io kernel) 'hb)))
|
||||
(jupyter-hb-unpause hb)))
|
||||
|
||||
(cl-defmethod jupyter-hb-beating-p ((client jupyter-kernel-client))
|
||||
"Is CLIENT still connected to its kernel?"
|
||||
(and (slot-boundp client 'conn)
|
||||
(with-slots (conn) client
|
||||
(or (null (jupyter-connection-hb conn))
|
||||
(jupyter-hb-beating-p (jupyter-connection-hb conn))))))
|
||||
(when-let* ((kernel (jupyter-kernel client)))
|
||||
(let ((hb (jupyter-send (jupyter-io kernel) 'hb)))
|
||||
(or (null hb) (jupyter-hb-beating-p hb)))))
|
||||
|
||||
;;; Mapping kernelspecs to connected clients
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue