Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
add options for live documentation timeout to the notebook command
Browse files Browse the repository at this point in the history
  • Loading branch information
ppurka committed Apr 2, 2013
1 parent 7346a9a commit 2f3aaa9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions sagenb/notebook/notebook_object.py
Expand Up @@ -102,6 +102,11 @@ class NotebookObject:
timeout can be useful as this will free the memory used by
idle sessions.
- ``doc_timeout`` -- integer (default: 120) seconds until idle
live documentation worksheet sessions automatically timeout,
i.e., the corresponding Sage session terminates.
0 means "never timeout".
- ``server_pool`` -- list of strings (default: None) list;
this option specifies that worksheet processes run as a
separate user (chosen from the list in the ``server_pool``
Expand Down
5 changes: 4 additions & 1 deletion sagenb/notebook/run_notebook.py
Expand Up @@ -452,7 +452,9 @@ def notebook_run(self,
server_pool = None,
ulimit = '',

timeout = 0,
timeout = 0, # timeout for normal worksheets. This is the
# same as idle_timeout in server_conf.py
doc_timeout = 120, # timeout for documentation worksheets

upload = None,
automatic_login = True,
Expand Down Expand Up @@ -535,6 +537,7 @@ def notebook_run(self,
print "The notebook files are stored in:", nb._dir

nb.conf()['idle_timeout'] = int(timeout)
nb.conf()['doc_timeout'] = int(doc_timeout)

if openid is not None:
nb.conf()['openid'] = openid
Expand Down

0 comments on commit 2f3aaa9

Please sign in to comment.