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:
55
55
# bucket_name: [AWS S3 Bucket Name]
56
56
# bucket_prefix: [prefix] (default: /)
57
57
# threads: [1+] (default: 1 per CPU)
58
+ # chunk_size_mb: [1+] (default: 50)
58
59
# secure: [true|false] (default: true)
59
60
# retries: [1+] (default: 5)
60
61
# acl: [acl_str] (default: none)
Original file line number Diff line number Diff line change 1
1
import os
2
2
import logging
3
3
4
+ import boto .s3 .multipart
4
5
from copy_reg import pickle
5
6
from math import ceil
6
7
from multiprocessing import Pool
@@ -102,7 +103,10 @@ def run(self):
102
103
self ._pool .close ()
103
104
self ._pool .join ()
104
105
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 :
106
110
self ._multipart .complete_upload ()
107
111
key = self .bucket .get_key (key_name )
108
112
if self .s3_acl :
You can’t perform that action at this time.
0 commit comments