progress nessage is sent back upon processing the object, the change make sure it stay with the max result

Signed-off-by: galsalomon66 <gal.salomon@gmail.com>
This commit is contained in:
galsalomon66 2023-04-10 12:26:59 +03:00
parent bc2a3b0b70
commit 008f5025f7

View file

@ -297,18 +297,19 @@ def run_s3select(bucket,key,query,column_delim=",",row_delim="\n",quot_char='"',
result += records
else:
result = []
max_progress_scanned = 0
for event in r['Payload']:
if 'Records' in event:
records = event['Records']
result.append(records.copy())
if 'Progress' in event:
progress = event['Progress']
result_status['Progress'] = event['Progress']
if(event['Progress']['Details']['BytesScanned'] > max_progress_scanned):
max_progress_scanned = event['Progress']['Details']['BytesScanned']
result_status['Progress'] = event['Progress']
if 'Stats' in event:
stats = event['Stats']
result_status['Stats'] = event['Stats']
if 'End' in event:
end = event['End']
result_status['End'] = event['End']
if progress == False: