Skip to content

Commit 703458e

Browse files
committed
When adding new multigrid controllers check for dormant ones and remove them
1 parent cd07dab commit 703458e

File tree

1 file changed

+3
-0
lines changed
  • src/murfey/instrument_server

1 file changed

+3
-0
lines changed

src/murfey/instrument_server/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ def start_multigrid_watcher(
144144
if controllers.get(session_id) is not None:
145145
return {"success": True}
146146
label = watcher_spec.label
147+
for sid, controller in controllers.items():
148+
if controller.dormant:
149+
del controllers[sid]
147150
controllers[session_id] = MultigridController(
148151
[],
149152
watcher_spec.visit,

0 commit comments

Comments
 (0)