From bd23c0525c93d84b532ba44d1845b68aab3576ea Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 16 Mar 2018 16:37:14 +0100 Subject: [PATCH] call it last_activity_times --- notebook/notebookapp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index b9d04eefa7..ca0083567b 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -265,7 +265,8 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager, # Jupyter stuff started=now, # place for extensions to register activity - activity_sources={}, + # 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, @@ -362,7 +363,7 @@ def last_activity(self): sources.append(self.settings['terminal_last_activity']) except KeyError: pass - sources.extend(self.settings['activity_sources'].values()) + sources.extend(self.settings['last_activity_times'].values()) return max(sources) @@ -1274,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: