Skip to content

Commit

Permalink
Autosave every 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
anitakar committed May 9, 2018
1 parent 81fd027 commit 88d0e9d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions remote_notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ COPY seahorse_notebook_path /usr/local/lib/python2.7/site-packages

COPY jupyter_notebook_config.py /home/jovyan/.jupyter
COPY wmcontents /opt/conda/lib/python3.5/site-packages/wmcontents
RUN mkdir -p /home/jovyan/.jupyter/custom
COPY custom.js /home/jovyan/.jupyter/custom

# seahorse_notebook_path is copied two times, because it is needed
# by forwarding_kernel (python 2.7) and by notebook server (python 3.5)
Expand Down
12 changes: 12 additions & 0 deletions remote_notebook/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
define([
'base/js/namespace',
'base/js/events'
],
function(IPython, events) {
events.on('kernel_connected.Kernel',
function () {
IPython.notebook.set_autosave_interval(5000); //in milliseconds
}
);
}
);

0 comments on commit 88d0e9d

Please sign in to comment.