File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
mongodb_consistent_backup/Upload/S3 Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ production:
5555 # bucket_name: [AWS S3 Bucket Name]
5656 # bucket_prefix: [prefix] (default: /)
5757 # threads: [1+] (default: 1 per CPU)
58+ # chunk_size_mb: [1+] (default: 50)
5859 # secure: [true|false] (default: true)
5960 # retries: [1+] (default: 5)
6061 # acl: [acl_str] (default: none)
Original file line number Diff line number Diff line change 11import os
22import logging
33
4+ import boto .s3 .multipart
45from copy_reg import pickle
56from math import ceil
67from multiprocessing import Pool
@@ -102,7 +103,10 @@ def run(self):
102103 self ._pool .close ()
103104 self ._pool .join ()
104105
105- if len (self ._multipart .get_all_parts ()) == chunk_count :
106+ part_count = 0
107+ for part in boto .s3 .multipart .part_lister (self ._multipart ):
108+ part_count += 1
109+ if part_count == chunk_count :
106110 self ._multipart .complete_upload ()
107111 key = self .bucket .get_key (key_name )
108112 if self .s3_acl :
You can’t perform that action at this time.
0 commit comments