@@ -59,6 +59,7 @@ def process_sxt_tilt_series_workflow(
5959 murfey_db .add (tilt_series )
6060 murfey_db .commit ()
6161
62+ # Find all processing jobs registered for this tilt series
6263 collected_ids = murfey_db .exec (
6364 select (DataCollectionGroup , DataCollection , ProcessingJob , AutoProcProgram )
6465 .where (DataCollectionGroup .session_id == session_id )
@@ -67,8 +68,7 @@ def process_sxt_tilt_series_workflow(
6768 .where (DataCollection .dcg_id == DataCollectionGroup .id )
6869 .where (ProcessingJob .dc_id == DataCollection .id )
6970 .where (AutoProcProgram .pj_id == ProcessingJob .id )
70- .where (ProcessingJob .recipe == "sxt-aretomo" )
71- ).one ()
71+ ).all ()
7272 instrument_name = (
7373 murfey_db .exec (select (Session ).where (Session .id == session_id ))
7474 .one ()
@@ -95,29 +95,34 @@ def process_sxt_tilt_series_workflow(
9595 / f"{ tilt_series .tag } _stack.mrc"
9696 )
9797 stack_file .parent .mkdir (parents = True , exist_ok = True )
98- zocalo_message = {
99- "recipes" : ["sxt-aretomo" ],
100- "parameters" : {
101- "txrm_file" : tilt_series_info .txrm ,
102- "xrm_reference" : tilt_series_info .xrm_reference or "" ,
103- "dcid" : collected_ids [1 ].id ,
104- "appid" : collected_ids [3 ].id ,
105- "stack_file" : str (stack_file ),
106- "tilt_axis" : 0 ,
107- "pixel_size" : tilt_series_info .pixel_size ,
108- "manual_tilt_offset" : - tilt_series_info .tilt_offset ,
109- "node_creator_queue" : machine_config .node_creator_queue ,
110- },
111- }
112- if _transport_object :
113- logger .info (
114- f"Sending Zocalo message for processing: { sanitise (str (zocalo_message ))} "
115- )
116- _transport_object .send ("processing_recipe" , zocalo_message , new_connection = True )
117- else :
118- logger .info (
119- f"No transport object found. Zocalo message would be { sanitise (str (zocalo_message ))} "
120- )
98+
99+ for recipe_ids in collected_ids :
100+ # Loop over all processing jobs, and send the alignment recipe for it
101+ zocalo_message = {
102+ "recipes" : recipe_ids [2 ].recipe ,
103+ "parameters" : {
104+ "txrm_file" : tilt_series_info .txrm ,
105+ "xrm_reference" : tilt_series_info .xrm_reference or "" ,
106+ "dcid" : recipe_ids [1 ].id ,
107+ "appid" : recipe_ids [3 ].id ,
108+ "stack_file" : str (stack_file ),
109+ "tilt_axis" : 0 ,
110+ "pixel_size" : tilt_series_info .pixel_size ,
111+ "manual_tilt_offset" : - tilt_series_info .tilt_offset ,
112+ "node_creator_queue" : machine_config .node_creator_queue ,
113+ },
114+ }
115+ if _transport_object :
116+ logger .info (
117+ f"Sending Zocalo message for processing: { sanitise (str (zocalo_message ))} "
118+ )
119+ _transport_object .send (
120+ "processing_recipe" , zocalo_message , new_connection = True
121+ )
122+ else :
123+ logger .info (
124+ f"No transport object found. Zocalo message would be { sanitise (str (zocalo_message ))} "
125+ )
121126 tilt_series .processing_requested = True
122127 murfey_db .add (tilt_series )
123128 murfey_db .commit ()
0 commit comments