Skip to content

Commit 7a39220

Browse files
committed
Add breaks to avoid looping through all cells
1 parent 02b2b99 commit 7a39220

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jupyter_server_documents/kernels/kernel_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ async def handle_document_related_message(self, msg: t.List[bytes]) -> t.Optiona
259259
# https://github.com/jupyterlab/jupyterlab/blob/0ad84d93be9cb1318d749ffda27fbcd013304d50/packages/cells/src/widget.ts#L1670-L1678
260260
state = 'running' if execution_state == 'busy' else execution_state
261261
target_cell["execution_state"] = state
262+
break
262263

263264
case "execute_input":
264265
if cell_id:
@@ -270,6 +271,7 @@ async def handle_document_related_message(self, msg: t.List[bytes]) -> t.Optiona
270271
_, target_cell = notebook.find_cell(cell_id)
271272
if target_cell:
272273
target_cell["execution_count"] = execution_count
274+
break
273275

274276
case "stream" | "display_data" | "execute_result" | "error":
275277
if cell_id:

0 commit comments

Comments
 (0)