Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop notebook on error #251

Open
elamre opened this issue Jul 21, 2022 · 2 comments
Open

stop notebook on error #251

elamre opened this issue Jul 21, 2022 · 2 comments

Comments

@elamre
Copy link

elamre commented Jul 21, 2022

Is there a way for the notebook to stop running on error? It ignores my Panic statements (other than just printing out) and even os.Exit doesn't seem to do much. Am I missing somethign?

@cosmos72
Copy link
Member

cosmos72 commented Aug 5, 2022

You want to stop a notebook server programmatically?

Executing os.Exit will cause gophernotes to exit, but jupyter (or whatever notebook frontend you are using) will just notice it,
show a message similar to

Kernel Restarting
The kernel appears to have died. It will restart automatically.

and start another gophernotes process.

So the solution, if any, is to send a ZMQ message from gophernotes to the notebook asking it to exit.
Spoiler: I have no idea if notebook's protocol define such a message. Maybe @sbinet ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants