@@ -203,12 +203,10 @@ async def path_upload_handler(
203203 failed .append (full_file_path )
204204 return
205205 else :
206- succeeded = await handle_existed (
206+ await handle_existed (
207207 full_file_path , sha1 , main_path_key ,
208- main_bucket_name , main_file_object , failed
208+ main_bucket_name , main_file_object
209209 )
210- if not succeeded :
211- return
212210
213211 # do copy:
214212 for target_ in extra_prefixed_buckets :
@@ -241,12 +239,12 @@ async def path_upload_handler(
241239 else :
242240 await handle_existed (
243241 full_file_path , sha1 , extra_path_key ,
244- extra_bucket_name , file_object , failed
242+ extra_bucket_name , file_object
245243 )
246244
247245 async def handle_existed (
248246 file_path , file_sha1 , path_key ,
249- bucket_name , file_object , failed_paths
247+ bucket_name , file_object
250248 ) -> bool :
251249 logger .debug (
252250 "File %s already exists in bucket %s, check if need to update product." ,
@@ -257,10 +255,9 @@ async def handle_existed(
257255 f_meta [CHECKSUM_META_KEY ] if CHECKSUM_META_KEY in f_meta else ""
258256 )
259257 if checksum != "" and checksum .strip () != file_sha1 :
260- logger .warning ('Error : checksum check failed. The file %s is '
258+ logger .warning ('Warning : checksum check failed. The file %s is '
261259 'different from the one in S3 bucket %s. Product: %s' ,
262260 path_key , bucket_name , product )
263- failed_paths .append (file_path )
264261 return False
265262 (prods , no_error ) = await self .__run_async (
266263 self .__get_prod_info ,
@@ -277,7 +274,6 @@ async def handle_existed(
277274 path_key , bucket_name , prods
278275 )
279276 if not result :
280- failed_paths .append (file_path )
281277 return False
282278 return True
283279
@@ -703,8 +699,8 @@ async def __update_prod_info(
703699 logger .debug ("Updated product infomation for file %s" , file )
704700 return True
705701 except (ClientError , HTTPClientError ) as e :
706- logger .error ( "ERROR : Can not update product info for file %s "
707- "due to error: %s" , file , e )
702+ logger .warning ( "WARNING : Can not update product info for file %s "
703+ "due to error: %s" , file , e )
708704 return False
709705 else :
710706 logger .debug ("Removing product infomation file for file %s "
@@ -724,8 +720,8 @@ async def __update_prod_info(
724720 logger .debug ("Removed product infomation file for file %s" , file )
725721 return True
726722 except (ClientError , HTTPClientError ) as e :
727- logger .error ( "ERROR : Can not delete product info file for file %s "
728- "due to error: %s" , file , e )
723+ logger .warning ( "WARNING : Can not delete product info file for file %s "
724+ "due to error: %s" , file , e )
729725 return False
730726
731727 def __path_handler_count_wrapper (
0 commit comments