Skip to content

Commit 7e95102

Browse files
committed
Removed keys from 'check_multigrid_controller_status' that are unlikely to be useful for now; ignore RuntimeError when trying to start a MultigridWatcher, as this can trigger when the backend server is rebooted and the client is running
1 parent 14af79b commit 7e95102

File tree

1 file changed

+5
-1
lines changed
  • src/murfey/instrument_server

1 file changed

+5
-1
lines changed

src/murfey/instrument_server/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ def start_multigrid_watcher(session_id: MurfeySessionID, process: bool = True):
211211
return {"success": False}
212212
if not process:
213213
watchers[session_id]._analyse = False
214-
watchers[session_id].start()
214+
try:
215+
watchers[session_id].start()
216+
# Ignore RuntimeError; this happens when reconnecting after a backend server restart
217+
except RuntimeError:
218+
logger.debug(f"MultigridWatcher for session {session_id} is already active")
215219
return {"success": True}
216220

217221

0 commit comments

Comments
 (0)