@@ -164,6 +164,8 @@ def _process_batch(batch_index, request_batch, node_id, force_overwrite, api_gat
164164 fully processed.
165165
166166 """
167+ global SUMMARY_TABLE
168+
167169 logger = get_logger ("_process_batch" , console = False )
168170
169171 # Get an avaialble Batch progress bar to update while iterating through this
@@ -451,6 +453,8 @@ def ingress_file_to_s3(ingress_response, batch_index, batch_pbar):
451453 If an unexpected response is received from the Ingress Lambda app.
452454
453455 """
456+ global SUMMARY_TABLE
457+
454458 logger = get_logger ("ingress_file_to_s3" , console = False )
455459
456460 response_result = int (ingress_response .get ("result" , - 1 ))
@@ -477,12 +481,14 @@ def ingress_file_to_s3(ingress_response, batch_index, batch_pbar):
477481 with open (ingress_path , "rb" ) as infile :
478482 # Wrap file I/O with our upload bar to automatically track file upload progress
479483 wrapped_file = CallbackIOWrapper (upload_pbar .update , infile , "read" )
480- files = {"file" : (os .path .basename (ingress_path ), wrapped_file , "application/octet-stream" )}
481- response = requests .put (s3_ingress_url , files = files , headers = headers )
484+ #files = {"file": (os.path.basename(ingress_path), wrapped_file, "application/octet-stream")}
485+ #response = requests.put(s3_ingress_url, files=files, headers=headers)
486+ response = requests .put (s3_ingress_url , data = wrapped_file , headers = headers )
482487 response .raise_for_status ()
483488
484489 logger .info ("Batch %d : %s Ingest complete" , batch_index , trimmed_path )
485490 update_summary_table (SUMMARY_TABLE , "uploaded" , ingress_path )
491+ upload_pbar .reset ()
486492 elif response_result == HTTPStatus .NO_CONTENT :
487493 logger .info (
488494 "Batch %d : Skipping ingress for %s, reason %s" , batch_index , trimmed_path , ingress_response .get ("message" )
@@ -529,6 +535,8 @@ def ingress_multipart_file_to_s3(ingress_response, batch_index, batch_pbar):
529535 If an unexpected response is received from the Ingress Lambda app.
530536
531537 """
538+ global SUMMARY_TABLE
539+
532540 logger = get_logger ("ingress_multipart_file_to_s3" , console = False )
533541
534542 response_result = int (ingress_response .get ("result" , - 1 ))
0 commit comments