Re: [jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-20 Thread Michael Milligan
I'm surprised to hear that throwing an exception there causes any havoc; in the code there is a generic exception handler that shouldn't let any uncaught exceptions leak through. There is potential for trouble, though, if you are using a spawner that does some vial initialization during the

Re: [jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-19 Thread Tim Harsch
Thank you Michael, that is very helpful. In this case I am using pre_spawn_hook, in lieu of a spawner options form. So I think the exceptions are causing havoc to the server. I went the route of the pre_spawn_hook because in my case because the user doesn't need to inform the hub of the

Re: [jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-19 Thread Michael Milligan
Hi, The Spawner's start() function is called unconditionally after pre_spawn_hook() returns, so you're correct that the return value will have no effect. However, if you raise an exception, it will be caught by the app and the associated error message will be logged. There are some cases where

[jupyter] Invalidate spawn in pre_spawn_hook?

2018-01-19 Thread Tim Harsch
Hi all, Is there a way in the pre_spawn_hook I could invalidate the spawn? return True/False doesn't work. I'd like it to ultimately produce a user friendly result to the user if an issue occurs Thanks, Tim -- You received this message because you are subscribed to the Google Groups