@@ -263,18 +263,18 @@ def get_rsyncers_for_session(session_id: MurfeySessionID, db=murfey_db):
263263 return rsync_instances .all ()
264264
265265
266- class RsyncerSource (BaseModel ):
267- source : str
266+ class StringOfPathModel (BaseModel ):
267+ path : str
268268
269269
270270@router .post ("/sessions/{session_id}/rsyncer_stopped" )
271271def register_stopped_rsyncer (
272- session_id : int , rsyncer_source : RsyncerSource , db = murfey_db
272+ session_id : int , rsyncer_source : StringOfPathModel , db = murfey_db
273273):
274274 rsyncer = db .exec (
275275 select (RsyncInstance )
276276 .where (RsyncInstance .session_id == session_id )
277- .where (RsyncInstance .source == rsyncer_source .source )
277+ .where (RsyncInstance .source == rsyncer_source .path )
278278 ).one ()
279279 rsyncer .transferring = False
280280 db .add (rsyncer )
@@ -283,12 +283,12 @@ def register_stopped_rsyncer(
283283
284284@router .post ("/sessions/{session_id}/rsyncer_started" )
285285def register_restarted_rsyncer (
286- session_id : int , rsyncer_source : RsyncerSource , db = murfey_db
286+ session_id : int , rsyncer_source : StringOfPathModel , db = murfey_db
287287):
288288 rsyncer = db .exec (
289289 select (RsyncInstance )
290290 .where (RsyncInstance .session_id == session_id )
291- .where (RsyncInstance .source == rsyncer_source .source )
291+ .where (RsyncInstance .source == rsyncer_source .path )
292292 ).one ()
293293 rsyncer .transferring = True
294294 db .add (rsyncer )
@@ -349,9 +349,13 @@ def get_foil_hole(
349349
350350
351351@spa_router .post ("/sessions/{session_id}/make_atlas_jpg" )
352- def make_atlas_jpg (session_id : MurfeySessionID , atlas_mrc : str , db = murfey_db ):
352+ def make_atlas_jpg (
353+ session_id : MurfeySessionID , atlas_mrc : StringOfPathModel , db = murfey_db
354+ ):
353355 session = db .exec (select (Session ).where (Session .id == session_id )).one ()
354- return atlas_jpg_from_mrc (session .instrument_name , session .visit , Path (atlas_mrc ))
356+ return atlas_jpg_from_mrc (
357+ session .instrument_name , session .visit , Path (atlas_mrc .path )
358+ )
355359
356360
357361@spa_router .post ("/sessions/{session_id}/grid_square/{gsid}" )
0 commit comments