Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add settings['activity_sources'] #3401

Merged
merged 2 commits into from
Mar 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager,
},
version_hash=version_hash,
ignore_minified_js=jupyter_app.ignore_minified_js,

# rate limits
iopub_msg_rate_limit=jupyter_app.iopub_msg_rate_limit,
iopub_data_rate_limit=jupyter_app.iopub_data_rate_limit,
Expand All @@ -242,7 +242,7 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager,
# tornado defaults are 100 MiB, we increase it to 0.5 GiB
max_body_size = 512 * 1024 * 1024,
max_buffer_size = 512 * 1024 * 1024,

# authentication
cookie_secret=jupyter_app.cookie_secret,
login_url=url_path_join(base_url,'/login'),
Expand All @@ -264,6 +264,9 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager,

# Jupyter stuff
started=now,
# place for extensions to register activity
# so that they can prevent idle-shutdown
last_activity_times={},
jinja_template_vars=jupyter_app.jinja_template_vars,
nbextensions_path=jupyter_app.nbextensions_path,
websocket_url=jupyter_app.websocket_url,
Expand Down Expand Up @@ -360,6 +363,7 @@ def last_activity(self):
sources.append(self.settings['terminal_last_activity'])
except KeyError:
pass
sources.extend(self.settings['last_activity_times'].values())
return max(sources)


Expand Down Expand Up @@ -1271,7 +1275,7 @@ def init_webapp(self):
self.session_manager, self.kernel_spec_manager,
self.config_manager, self.extra_services,
self.log, self.base_url, self.default_url, self.tornado_settings,
self.jinja_environment_options
self.jinja_environment_options,
)
ssl_options = self.ssl_options
if self.certfile:
Expand Down