@@ -72,14 +72,10 @@ def on_start(self, rw, header, message):
7272 response_info = update_dcid_info_file (
7373 minio_client , bucket_name , dcid , 0 , rpid , self .log
7474 )
75- try :
76- image_files = iris .get_image_files (images , self .log )
77- s3echo_upload_files .update (
78- {name : (dcid , pth ) for name , pth in image_files .items ()}
79- )
80- except Exception as err :
81- self .log .exception ("Error uploading image files to S3 Echo" )
82- raise err
75+ image_files = iris .get_image_files (images , self .log )
76+ s3echo_upload_files .update (
77+ {name : (dcid , pth ) for name , pth in image_files .items ()}
78+ )
8379 if not response_info :
8480 self .log .debug ("Sending message to upload endpoint" )
8581 rw .send_to (
@@ -93,23 +89,19 @@ def on_start(self, rw, header, message):
9389 response_info = update_dcid_info_file (
9490 minio_client , bucket_name , dcid , 0 , rpid , self .log
9591 )
96- try :
97- image_files = iris .get_related_images_files_from_h5 (
98- image_master_file , self .log
99- )
100- s3echo_upload_files .update (
101- {name : (dcid , pth ) for name , pth in image_files .items ()}
92+ image_files = iris .get_related_images_files_from_h5 (
93+ image_master_file , self .log
94+ )
95+ s3echo_upload_files .update (
96+ {name : (dcid , pth ) for name , pth in image_files .items ()}
97+ )
98+ if not response_info :
99+ self .log .debug ("Sending message to upload endpoint" )
100+ rw .send_to (
101+ "upload" ,
102+ {"s3echo_upload" : {dcid : image_files }},
103+ transaction = txn ,
102104 )
103- if not response_info :
104- self .log .debug ("Sending message to upload endpoint" )
105- rw .send_to (
106- "upload" ,
107- {"s3echo_upload" : {dcid : image_files }},
108- transaction = txn ,
109- )
110- except Exception as err :
111- self .log .exception ("Error uploading image files to S3 Echo" )
112- raise err
113105 rw .environment .update ({"s3echo_upload" : s3echo_upload_files })
114106 self .log .debug ("Sending message to watch endpoint" )
115107 rw .send_to ("watch" , message , transaction = txn )
0 commit comments