Notifying user of issues in post-save hook

46 views
Skip to first unread message

Jake Battle

unread,
Mar 24, 2017, 12:40:42 PM3/24/17
to Project Jupyter
I've written a simple post-save hook to back up the file to S3. If the update fails, is there a supported way to notify the user in the interface? (I don't want to rely on the user watching the logs). 

I'm not picky about what the notification would look like - I just want to alert the user to the fact that the save (partially) failed so the user can fix whatever is wrong.

I'm using a simple post_save_hook but I'm willing to rework this using the Content Manager API or install extensions if those make this possible.

thanks!
- Jake

Thomas Kluyver

unread,
Mar 25, 2017, 3:56:07 PM3/25/17
to Project Jupyter
Hi Jake,

With notebook 5.0 (soon! We're at RC2 now), if your hook raises an exception, it should display a notification to the user (though it will say that save failed, which isn't quite true). Here's the PR that added that:
https://github.com/jupyter/notebook/pull/1561

Thomas

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/b44f8b96-ad35-45e3-a6fc-bd8be94515ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jake Battle

unread,
Mar 29, 2017, 1:05:43 PM3/29/17
to Project Jupyter
That's great - thanks Thomas!


On Saturday, March 25, 2017 at 2:56:07 PM UTC-5, takowl wrote:
Hi Jake,

With notebook 5.0 (soon! We're at RC2 now), if your hook raises an exception, it should display a notification to the user (though it will say that save failed, which isn't quite true). Here's the PR that added that:
https://github.com/jupyter/notebook/pull/1561

Thomas
On 24 March 2017 at 16:40, Jake Battle <jba...@civisanalytics.com> wrote:
I've written a simple post-save hook to back up the file to S3. If the update fails, is there a supported way to notify the user in the interface? (I don't want to rely on the user watching the logs). 

I'm not picky about what the notification would look like - I just want to alert the user to the fact that the save (partially) failed so the user can fix whatever is wrong.

I'm using a simple post_save_hook but I'm willing to rework this using the Content Manager API or install extensions if those make this possible.

thanks!
- Jake

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages