ipython / ipython/ipykernel

How can I detect from labextension whether kernel is still alive?

Abierto
#428 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
734
Forks
412
Merge medio
1 d 5 h
PR fusionados (30 d)
8

Descripción

I use ipykernel 5.1.2 on a remote machine via ssh with local comm ports (created by jupyter lab 1.1.1) mapped to remote comm ports (created via `jupyter_client.write_connection_file`) via ssh port forwarding.

Everything works perfectly fine.
Now, my remote machine can be stopped externally (auto termination of remote platform).
I don't find a reasonable way to detect from javascript (in my labextension) whether the python kernel is really alive.
None of the status or alive methods detect a vanished kernel. The last idea I had was to use something like

```
f = s.kernel.requestExecute({code:"pass", silent:true})
f.onReply = handler
```
to force python execution (when returning immediatley/soon, I am sure the kernel runs)

However, sound like pretty heavy.

Is there an easier way that reliably detects kernel death?

Thanks,
Bernhard

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.