Skip to content

Commit 8f38607

Browse files
committed
The server can work out from the session whether there should be processing or not
1 parent dc652ba commit 8f38607

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/murfey/server/api/instrument.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,11 @@ async def setup_multigrid_watcher(
140140

141141

142142
@router.post("/sessions/{session_id}/start_multigrid_watcher")
143-
async def start_multigrid_watcher(
144-
session_id: MurfeySessionID, process: bool = True, db=murfey_db
145-
):
143+
async def start_multigrid_watcher(session_id: MurfeySessionID, db=murfey_db):
146144
data = {}
147-
instrument_name = (
148-
db.exec(select(Session).where(Session.id == session_id)).one().instrument_name
149-
)
145+
session = db.exec(select(Session).where(Session.id == session_id)).one()
146+
process = session.process
147+
instrument_name = session.instrument_name
150148
machine_config = get_machine_config(instrument_name=instrument_name)[
151149
instrument_name
152150
]

0 commit comments

Comments
 (0)