Skip to content

Commit fb84819

Browse files
committed
Added instrument server endpoint to check whether a multigrid controller exists
1 parent e140f35 commit fb84819

File tree

1 file changed

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

1 file changed

+9
-0
lines changed

src/murfey/instrument_server/api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ def update_multigrid_controller_visit_end_time(
223223
return {"success": True}
224224

225225

226+
@router.post("/sessions/{session_id}/multigrid_controller/status")
227+
def check_multigrid_controller_exists(
228+
session_id: MurfeySessionID,
229+
):
230+
if controllers.get(session_id, None) is not None:
231+
return {"exists": True}
232+
return {"exists": False}
233+
234+
226235
class RsyncerSource(BaseModel):
227236
source: Path
228237

0 commit comments

Comments
 (0)