Permalink
Browse files

add options for live documentation timeout to the notebook command

  • Loading branch information...
1 parent 7346a9a commit 2f3aaa9755c06a0d43c0b1512b2fadf07d6d3d45 @ppurka ppurka committed Apr 2, 2013
Showing with 9 additions and 1 deletion.
  1. +5 −0 sagenb/notebook/notebook_object.py
  2. +4 −1 sagenb/notebook/run_notebook.py
@@ -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``
@@ -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,
@@ -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

0 comments on commit 2f3aaa9

Please sign in to comment.