From 2bc1a03fbef015d69182b8952c0d0793d35428b4 Mon Sep 17 00:00:00 2001 From: Feyzullah Alim Kalyoncu Date: Thu, 17 Feb 2022 13:35:51 +0300 Subject: [PATCH] Update autostop.py We've observed that sometimes notebooks/consoles getting stuck in 'starting' state. Aborting only when execution state is busy will make this code work properly. --- scripts/auto-stop-idle/autostop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/auto-stop-idle/autostop.py b/scripts/auto-stop-idle/autostop.py index 3057655..7edb0e7 100755 --- a/scripts/auto-stop-idle/autostop.py +++ b/scripts/auto-stop-idle/autostop.py @@ -91,7 +91,7 @@ def get_notebook_name(): for notebook in data: # Idleness is defined by Jupyter # https://github.com/jupyter/notebook/issues/4634 - if notebook['kernel']['execution_state'] == 'idle': + if notebook['kernel']['execution_state'] != 'busy': if not ignore_connections: if notebook['kernel']['connections'] == 0: if not is_idle(notebook['kernel']['last_activity']):