PyS3Uploader 0.4.0b1__py3-none-any.whl → 0.4.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pys3uploader/uploader.py +18 -10
- pys3uploader/version.py +1 -1
- {pys3uploader-0.4.0b1.dist-info → pys3uploader-0.4.0b2.dist-info}/METADATA +1 -1
- {pys3uploader-0.4.0b1.dist-info → pys3uploader-0.4.0b2.dist-info}/RECORD +7 -7
- {pys3uploader-0.4.0b1.dist-info → pys3uploader-0.4.0b2.dist-info}/LICENSE +0 -0
- {pys3uploader-0.4.0b1.dist-info → pys3uploader-0.4.0b2.dist-info}/WHEEL +0 -0
- {pys3uploader-0.4.0b1.dist-info → pys3uploader-0.4.0b2.dist-info}/top_level.txt +0 -0
pys3uploader/uploader.py
CHANGED
|
@@ -328,15 +328,29 @@ class Uploader:
|
|
|
328
328
|
files_to_upload[file_path] = object_path
|
|
329
329
|
return files_to_upload
|
|
330
330
|
|
|
331
|
-
def
|
|
332
|
-
"""
|
|
331
|
+
def _preflight(self) -> int:
|
|
332
|
+
"""Preflight checks and tasks before upload.
|
|
333
|
+
|
|
334
|
+
Returns:
|
|
335
|
+
int:
|
|
336
|
+
Returns the total number of files to be uploaded.
|
|
337
|
+
"""
|
|
333
338
|
# Verify and initiate bucket state
|
|
334
339
|
self.init()
|
|
335
340
|
# Verify and initiate local state
|
|
336
341
|
self.load_local_state()
|
|
342
|
+
# Make sure there are files to upload
|
|
343
|
+
assert self.upload_files, "\n\n\tNo files found to upload.\n"
|
|
344
|
+
# Log size details
|
|
337
345
|
self.size_it()
|
|
346
|
+
# Start metadata upload timer
|
|
338
347
|
self.timer.start()
|
|
339
|
-
|
|
348
|
+
# Return total files to upload
|
|
349
|
+
return len(self.upload_files)
|
|
350
|
+
|
|
351
|
+
def run(self) -> None:
|
|
352
|
+
"""Initiates object upload in a traditional loop."""
|
|
353
|
+
total_files = self._preflight()
|
|
340
354
|
|
|
341
355
|
self.logger.info(
|
|
342
356
|
"%d files from '%s' will be uploaded to '%s' sequentially",
|
|
@@ -367,13 +381,7 @@ class Uploader:
|
|
|
367
381
|
Args:
|
|
368
382
|
max_workers: Number of maximum threads to use.
|
|
369
383
|
"""
|
|
370
|
-
|
|
371
|
-
self.init()
|
|
372
|
-
# Verify and initiate local state
|
|
373
|
-
self.load_local_state()
|
|
374
|
-
self.size_it()
|
|
375
|
-
self.timer.start()
|
|
376
|
-
total_files = len(self.upload_files)
|
|
384
|
+
total_files = self._preflight()
|
|
377
385
|
|
|
378
386
|
self.logger.info(
|
|
379
387
|
"%d files from '%s' will be uploaded to '%s' with maximum concurrency of: %d",
|
pys3uploader/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "0.4.
|
|
1
|
+
version = "0.4.0b2"
|
|
@@ -5,11 +5,11 @@ pys3uploader/metadata.py,sha256=4pn8Y9dVZLFXxq5Cocm20t1mfDkV5xJXY6YEekQ8ssQ,231
|
|
|
5
5
|
pys3uploader/progress.py,sha256=IladNMXLBhkPpxOntpANTam_hC9OWosmNDmdbweDNYM,1195
|
|
6
6
|
pys3uploader/timer.py,sha256=8tvlQaO1Z7TfFVBhl5qrDq9wsMiOR6P0J2bkVwfM96c,1816
|
|
7
7
|
pys3uploader/tree.py,sha256=DiQ2ekMMaj2m_P3-iKkEqSuJCJZ_UZxcAwHtAoPVa5c,1824
|
|
8
|
-
pys3uploader/uploader.py,sha256=
|
|
8
|
+
pys3uploader/uploader.py,sha256=iaLsYaqyI4SeRmuQhQWEQpEzaA_U3szloOegj_axp-0,19611
|
|
9
9
|
pys3uploader/utils.py,sha256=8eIM5ZhS7-bYT5Dq4FNbmojQ16vvoAPF1ihCCTZezGE,5783
|
|
10
|
-
pys3uploader/version.py,sha256=
|
|
11
|
-
pys3uploader-0.4.
|
|
12
|
-
pys3uploader-0.4.
|
|
13
|
-
pys3uploader-0.4.
|
|
14
|
-
pys3uploader-0.4.
|
|
15
|
-
pys3uploader-0.4.
|
|
10
|
+
pys3uploader/version.py,sha256=FqI7luRfbr03_FdtC3SRipnHn79CZY6AjZYAM2RmRi0,20
|
|
11
|
+
pys3uploader-0.4.0b2.dist-info/LICENSE,sha256=8k-hEraOzyum0GvmmK65YxNRTFXK7eIFHJ0OshJXeTk,1068
|
|
12
|
+
pys3uploader-0.4.0b2.dist-info/METADATA,sha256=yVVlf8rbYL48rOXj6J5mt290xlz0xjhA3f7jO_tY1-Q,9155
|
|
13
|
+
pys3uploader-0.4.0b2.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
14
|
+
pys3uploader-0.4.0b2.dist-info/top_level.txt,sha256=lVIFMMoUx7dj_myetBmOUQTJiOzz5VyDqchnQElmrWw,13
|
|
15
|
+
pys3uploader-0.4.0b2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|