How can I detect from labextension whether kernel is still alive?
- 主要语言
- Python
- 星标
- 734
- 派生
- 412
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 8
描述
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
贡献指南
评估
这个 Issue 还没有评估数据。