File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1515
1616try :
1717 from smartem_backend .api_client import EntityConverter
18- from smartem_common .schemas import AcquisitionData
18+ from smartem_common .schemas import AcquisitionData , MicroscopeData
1919
2020 SMARTEM_ACTIVE = True
2121except ImportError :
@@ -160,12 +160,19 @@ async def setup_multigrid_watcher(
160160 if SMARTEM_ACTIVE and machine_config .smartem_api_url :
161161 log .info ("registering an acquisition with smartem" )
162162 try :
163+ microscope_data = MicroscopeData (instrument_id = instrument_name )
163164 acquisition_data = EntityConverter .acquisition_to_request (
164- AcquisitionData (name = visit )
165+ AcquisitionData (
166+ name = visit ,
167+ id = visit ,
168+ instrument = microscope_data ,
169+ storage_path = str (secure_path (watcher_spec .source / visit )),
170+ start_time = datetime .datetime .now (),
171+ )
165172 )
166173 async with clientsession .post (
167174 f"{ machine_config .smartem_api_url } /acquisitions" ,
168- json = acquisition_data .model_dump (),
175+ json = acquisition_data .model_dump (mode = "json" ),
169176 ) as response :
170177 acquisition_response_data = await response .json ()
171178 acquisition_uuid = acquisition_response_data ["uuid" ]
You can’t perform that action at this time.
0 commit comments