rclone-api 1.1.20__py2.py3-none-any.whl → 1.1.22__py2.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.
- rclone_api/rclone.py +1 -1
- rclone_api/s3/chunk_types.py +2 -0
- rclone_api/s3/chunk_uploader.py +20 -14
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/METADATA +2 -1
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/RECORD +9 -9
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/LICENSE +0 -0
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/WHEEL +0 -0
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.1.20.dist-info → rclone_api-1.1.22.dist-info}/top_level.txt +0 -0
rclone_api/rclone.py
CHANGED
rclone_api/s3/chunk_types.py
CHANGED
rclone_api/s3/chunk_uploader.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _thread
|
|
2
2
|
import os
|
|
3
|
+
import traceback
|
|
3
4
|
import warnings
|
|
4
5
|
from concurrent.futures import ThreadPoolExecutor
|
|
5
6
|
from pathlib import Path
|
|
@@ -50,18 +51,24 @@ def upload_task(
|
|
|
50
51
|
|
|
51
52
|
def handle_upload(
|
|
52
53
|
upload_info: UploadInfo, file_chunk: FileChunk | None
|
|
53
|
-
) -> FinishedPiece | None:
|
|
54
|
+
) -> FinishedPiece | Exception | None:
|
|
54
55
|
if file_chunk is None:
|
|
55
56
|
return None
|
|
56
57
|
chunk, part_number = file_chunk.data, file_chunk.part_number
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
try:
|
|
59
|
+
part: FinishedPiece = upload_task(
|
|
60
|
+
info=upload_info,
|
|
61
|
+
chunk=chunk,
|
|
62
|
+
part_number=part_number,
|
|
63
|
+
retries=upload_info.retries,
|
|
64
|
+
)
|
|
65
|
+
file_chunk.close()
|
|
66
|
+
return part
|
|
67
|
+
except Exception as e:
|
|
68
|
+
stacktrace = traceback.format_exc()
|
|
69
|
+
msg = f"Error uploading part {part_number}: {e}\n{stacktrace}"
|
|
70
|
+
warnings.warn(msg)
|
|
71
|
+
return e
|
|
65
72
|
|
|
66
73
|
|
|
67
74
|
def prepare_upload_file_multipart(
|
|
@@ -227,16 +234,15 @@ def upload_file_multipart(
|
|
|
227
234
|
break
|
|
228
235
|
|
|
229
236
|
def task(upload_info=upload_info, file_chunk=file_chunk):
|
|
230
|
-
|
|
231
|
-
return handle_upload(upload_info, file_chunk)
|
|
232
|
-
except Exception:
|
|
233
|
-
_thread.interrupt_main()
|
|
234
|
-
raise
|
|
237
|
+
return handle_upload(upload_info, file_chunk)
|
|
235
238
|
|
|
236
239
|
fut = executor.submit(task)
|
|
237
240
|
|
|
238
241
|
def done_cb(fut=fut):
|
|
239
242
|
result = fut.result()
|
|
243
|
+
if isinstance(result, Exception):
|
|
244
|
+
warnings.warn(f"Error uploading part: {result}, skipping")
|
|
245
|
+
return
|
|
240
246
|
# upload_state.finished_parts.put(result)
|
|
241
247
|
upload_state.add_finished(result)
|
|
242
248
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: rclone_api
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.22
|
|
4
4
|
Summary: rclone api in python
|
|
5
5
|
Home-page: https://github.com/zackees/rclone-api
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -11,6 +11,7 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: pyright>=1.1.393
|
|
13
13
|
Requires-Dist: python-dotenv>=1.0.0
|
|
14
|
+
Requires-Dist: certifi>=2025.1.31
|
|
14
15
|
Requires-Dist: boto3<=1.35.99,>=1.20.1
|
|
15
16
|
Dynamic: home-page
|
|
16
17
|
|
|
@@ -13,7 +13,7 @@ rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
|
|
|
13
13
|
rclone_api/group_files.py,sha256=H92xPW9lQnbNw5KbtZCl00bD6iRh9yRbCuxku4j_3dg,8036
|
|
14
14
|
rclone_api/mount.py,sha256=g9YkKCGJbWvGF7gzSKtWa8pEgphuW0-e0SySxtOirH4,6093
|
|
15
15
|
rclone_api/process.py,sha256=Hgn8MGEPkBt8C6C4oIuh-n1t1GkFF2miPlIE1lh_Zbc,5045
|
|
16
|
-
rclone_api/rclone.py,sha256=
|
|
16
|
+
rclone_api/rclone.py,sha256=gszjs6MJFoT5tKmBB06sd0OjbtZZAtRdjvha4RrE-lI,40252
|
|
17
17
|
rclone_api/remote.py,sha256=O9WDUFQy9f6oT1HdUbTixK2eg0xtBBm8k4Xl6aa6K00,431
|
|
18
18
|
rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
|
|
19
19
|
rclone_api/scan_missing_folders.py,sha256=Kulca2Q6WZodt00ATFHkmqqInuoPvBkhTcS9703y6po,4740
|
|
@@ -28,13 +28,13 @@ rclone_api/experimental/flags_base.py,sha256=ajU_czkTcAxXYU-SlmiCfHY7aCQGHvpCLqJ
|
|
|
28
28
|
rclone_api/s3/api.py,sha256=VstlaEnBjO2JDQuCRLdTfUGvQLbfshlXXhAzimFv4Vc,3763
|
|
29
29
|
rclone_api/s3/basic_ops.py,sha256=hK3366xhVEzEcjz9Gk_8lFx6MRceAk72cax6mUrr6ko,2104
|
|
30
30
|
rclone_api/s3/chunk_file.py,sha256=YELR-EzR7RHpzCDGpYdzlwu21NZW5wttIDvLoONI4aU,3477
|
|
31
|
-
rclone_api/s3/chunk_types.py,sha256=
|
|
32
|
-
rclone_api/s3/chunk_uploader.py,sha256=
|
|
31
|
+
rclone_api/s3/chunk_types.py,sha256=LbXayXY1KgVU1LkdbASD_BQ7TpVpwVnzMjtz--8LBaE,10316
|
|
32
|
+
rclone_api/s3/chunk_uploader.py,sha256=1jQAdk35Fa9Tcq36bS65262cs7AcNG2DAFQ-NdYlWSw,9961
|
|
33
33
|
rclone_api/s3/create.py,sha256=CN-wdH2boszcN0HiCHoJjiNnhJ0UoJ-QLAA5xbsfU-Q,3151
|
|
34
34
|
rclone_api/s3/types.py,sha256=yBnJ38Tjk6RlydJ-sqZ7DSfyFloy8KDYJ0mv3vlOzLE,1388
|
|
35
|
-
rclone_api-1.1.
|
|
36
|
-
rclone_api-1.1.
|
|
37
|
-
rclone_api-1.1.
|
|
38
|
-
rclone_api-1.1.
|
|
39
|
-
rclone_api-1.1.
|
|
40
|
-
rclone_api-1.1.
|
|
35
|
+
rclone_api-1.1.22.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
|
36
|
+
rclone_api-1.1.22.dist-info/METADATA,sha256=RV2Zt9LIzAjvYfIfkCMaZz3t2PlWcv0R6v46-P_FNrM,4514
|
|
37
|
+
rclone_api-1.1.22.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
|
|
38
|
+
rclone_api-1.1.22.dist-info/entry_points.txt,sha256=6eNqTRXKhVf8CpWNjXiOa_0Du9tHiW_HD2iQSXRsUg8,132
|
|
39
|
+
rclone_api-1.1.22.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
|
40
|
+
rclone_api-1.1.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|