@@ -56,6 +56,7 @@ def process_sxt_tilt_series_workflow(
5656 murfey_db .add (tilt_series )
5757 murfey_db .commit ()
5858
59+ # Find all processing jobs registered for this tilt series
5960 collected_ids = murfey_db .exec (
6061 select (DataCollectionGroup , DataCollection , ProcessingJob , AutoProcProgram )
6162 .where (DataCollectionGroup .session_id == session_id )
@@ -64,8 +65,7 @@ def process_sxt_tilt_series_workflow(
6465 .where (DataCollection .dcg_id == DataCollectionGroup .id )
6566 .where (ProcessingJob .dc_id == DataCollection .id )
6667 .where (AutoProcProgram .pj_id == ProcessingJob .id )
67- .where (ProcessingJob .recipe == "sxt-tomo-align" )
68- ).one ()
68+ ).all ()
6969 instrument_name = (
7070 murfey_db .exec (select (Session ).where (Session .id == session_id ))
7171 .one ()
@@ -92,25 +92,29 @@ def process_sxt_tilt_series_workflow(
9292 / f"{ tilt_series .tag } _stack.mrc"
9393 )
9494 stack_file .parent .mkdir (parents = True , exist_ok = True )
95- zocalo_message = {
96- "recipes" : ["sxt-tomo-align" ],
97- "parameters" : {
98- "txrm_file" : tilt_series_info .txrm ,
99- "dcid" : collected_ids [1 ].id ,
100- "appid" : collected_ids [3 ].id ,
101- "stack_file" : str (stack_file ),
102- "tilt_axis" : 0 ,
103- "pixel_size" : tilt_series_info .pixel_size ,
104- "manual_tilt_offset" : - tilt_series_info .tilt_offset ,
105- "node_creator_queue" : machine_config .node_creator_queue ,
106- },
107- }
108- if _transport_object :
109- logger .info (
110- f"Sending Zocalo message for processing: { sanitise (str (zocalo_message ))} "
111- )
112- _transport_object .send ("processing_recipe" , zocalo_message , new_connection = True )
113- else :
114- logger .info (
115- f"No transport object found. Zocalo message would be { sanitise (str (zocalo_message ))} "
116- )
95+ for recipe_ids in collected_ids :
96+ # Loop over all processing jobs, and send the alignment recipe for it
97+ zocalo_message = {
98+ "recipes" : recipe_ids [2 ].recipe ,
99+ "parameters" : {
100+ "txrm_file" : tilt_series_info .txrm ,
101+ "dcid" : recipe_ids [1 ].id ,
102+ "appid" : recipe_ids [3 ].id ,
103+ "stack_file" : str (stack_file ),
104+ "tilt_axis" : 0 ,
105+ "pixel_size" : tilt_series_info .pixel_size ,
106+ "manual_tilt_offset" : - tilt_series_info .tilt_offset ,
107+ "node_creator_queue" : machine_config .node_creator_queue ,
108+ },
109+ }
110+ if _transport_object :
111+ logger .info (
112+ f"Sending Zocalo message for processing: { sanitise (str (zocalo_message ))} "
113+ )
114+ _transport_object .send (
115+ "processing_recipe" , zocalo_message , new_connection = True
116+ )
117+ else :
118+ logger .info (
119+ f"No transport object found. Zocalo message would be { sanitise (str (zocalo_message ))} "
120+ )
0 commit comments