accli 1.1.2__tar.gz → 1.1.3__tar.gz
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.
- {accli-1.1.2 → accli-1.1.3}/PKG-INFO +1 -1
- {accli-1.1.2 → accli-1.1.3}/accli/AcceleratorTerminalCliProjectService.py +20 -10
- {accli-1.1.2 → accli-1.1.3}/accli/_version.py +1 -1
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/PKG-INFO +1 -1
- {accli-1.1.2 → accli-1.1.3}/LICENSE +0 -0
- {accli-1.1.2 → accli-1.1.3}/README.md +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/AcceleratorJobProjectService.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/AcceleratorTaskDispatcher.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/CsvRegionalTimeseriesValidator.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/__init__.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/__main__.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/cli.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/common.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli/token.py +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/SOURCES.txt +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/dependency_links.txt +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/entry_points.txt +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/requires.txt +0 -0
- {accli-1.1.2 → accli-1.1.3}/accli.egg-info/top_level.txt +0 -0
- {accli-1.1.2 → accli-1.1.3}/pyproject.toml +0 -0
- {accli-1.1.2 → accli-1.1.3}/setup.cfg +0 -0
|
@@ -281,7 +281,7 @@ class AcceleratorTerminalCliProjectService:
|
|
|
281
281
|
headers = dict()
|
|
282
282
|
headers["Content-Type"] = "application/octet-stream"
|
|
283
283
|
|
|
284
|
-
part_size, part_count =
|
|
284
|
+
part_size, part_count = 50 * 1024 ** 2, -1
|
|
285
285
|
|
|
286
286
|
upload_id = None
|
|
287
287
|
app_bucket_id = None
|
|
@@ -294,13 +294,21 @@ class AcceleratorTerminalCliProjectService:
|
|
|
294
294
|
uploaded_size = 0
|
|
295
295
|
put_presigned_url = None
|
|
296
296
|
|
|
297
|
-
futures = []
|
|
298
|
-
|
|
299
297
|
try:
|
|
300
298
|
|
|
301
299
|
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
|
|
302
300
|
|
|
301
|
+
active_futures = set()
|
|
302
|
+
|
|
303
303
|
while not stop:
|
|
304
|
+
if len(active_futures) >= max_workers:
|
|
305
|
+
done, active_futures = concurrent.futures.wait(
|
|
306
|
+
active_futures,
|
|
307
|
+
return_when=concurrent.futures.FIRST_COMPLETED
|
|
308
|
+
)
|
|
309
|
+
for f in done:
|
|
310
|
+
parts.append(f.result())
|
|
311
|
+
|
|
304
312
|
part_number += 1
|
|
305
313
|
part_data = self.read_part_data(
|
|
306
314
|
file_stream,
|
|
@@ -331,14 +339,16 @@ class AcceleratorTerminalCliProjectService:
|
|
|
331
339
|
# headers=headers
|
|
332
340
|
)
|
|
333
341
|
|
|
334
|
-
future = executor.submit(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
futures_results = concurrent.futures.wait(futures, return_when=concurrent.futures.ALL_COMPLETED)
|
|
342
|
+
future = executor.submit(
|
|
343
|
+
self.put_part, project_slug, app_bucket_id, uniqified_filename,
|
|
344
|
+
upload_id, part_number, part_data, progress, task
|
|
345
|
+
)
|
|
346
|
+
active_futures.add(future)
|
|
340
347
|
|
|
341
|
-
|
|
348
|
+
if active_futures:
|
|
349
|
+
done, _ = concurrent.futures.wait(active_futures, return_when=concurrent.futures.ALL_COMPLETED)
|
|
350
|
+
for f in done:
|
|
351
|
+
parts.append(f.result())
|
|
342
352
|
|
|
343
353
|
parts.sort(key=lambda x: x[0])
|
|
344
354
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|