[sagenb] 83/179: add options for live documentation timeout to the notebook command
felix salfelder
felix-guest at moszumanska.debian.org
Tue May 6 12:05:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository sagenb.
commit 2f3aaa9755c06a0d43c0b1512b2fadf07d6d3d45
Author: P Purkayastha <ppurka at gmail.com>
Date: Tue Apr 2 10:29:42 2013 +0800
add options for live documentation timeout to the notebook command
---
sagenb/notebook/notebook_object.py | 5 +++++
sagenb/notebook/run_notebook.py | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/sagenb/notebook/notebook_object.py b/sagenb/notebook/notebook_object.py
index 20970a7..62fd6cd 100644
--- a/sagenb/notebook/notebook_object.py
+++ b/sagenb/notebook/notebook_object.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``
diff --git a/sagenb/notebook/run_notebook.py b/sagenb/notebook/run_notebook.py
index 8f1b874..c2b78e9 100644
--- a/sagenb/notebook/run_notebook.py
+++ b/sagenb/notebook/run_notebook.py
@@ -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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git
More information about the debian-science-commits
mailing list