File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,17 +164,21 @@ async def setup_multigrid_watcher(
164164 acquisition_data = EntityConverter .acquisition_to_request (
165165 AcquisitionData (
166166 name = visit ,
167- microscope_data = microscope_data ,
168- working_dir = str (secure_path (watcher_spec .source / visit )),
167+ id = visit ,
168+ instrument = microscope_data ,
169+ storage_path = str (secure_path (watcher_spec .source / visit )),
170+ start_time = datetime .datetime .now (),
169171 )
170172 )
171173 async with clientsession .post (
172174 f"{ machine_config .smartem_api_url } /acquisitions" ,
173- json = acquisition_data .model_dump (),
175+ json = acquisition_data .model_dump (
176+ mode = "json" , exclude_none = True
177+ ),
174178 ) as response :
175179 acquisition_response_data = await response .json ()
176180 acquisition_uuid = acquisition_response_data ["uuid" ]
177- session .acquisition_uuid = acquisition_response_data or ""
181+ session .acquisition_uuid = acquisition_uuid or ""
178182 db .add (session )
179183 db .commit ()
180184 except Exception :
You can’t perform that action at this time.
0 commit comments