Skip to content

Commit 5f0f86a

Browse files
committed
Merge branch 'develop'
2 parents b448bbd + 801fff2 commit 5f0f86a

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

docs/changelog/0.9.1.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
0.9.1 (2023-08-17)
2+
==================
3+
4+
Bug Fixes
5+
---------
6+
7+
- Fixed bug then number of threads created by ``FileDownloader`` / ``FileUploader`` / ``FileMover`` was
8+
not ``min(workers, len(files))``, but ``max(workers, len(files))``. leading to create too much workers
9+
on large files list.

docs/changelog/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
DRAFT
66
NEXT_RELEASE
7+
0.9.1
78
0.9.0
89
0.8.1
910
0.8.0

onetl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0
1+
0.9.1

onetl/file/file_downloader/file_downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ def _bulk_download(
719719

720720
if workers > 1:
721721
with ThreadPoolExecutor(
722-
max_workers=max(workers, len(to_download)),
722+
max_workers=min(workers, len(to_download)),
723723
thread_name_prefix=self.__class__.__name__,
724724
) as executor:
725725
futures = [

onetl/file/file_mover/file_mover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def _bulk_move(
516516

517517
if workers > 1:
518518
with ThreadPoolExecutor(
519-
max_workers=max(workers, len(to_move)),
519+
max_workers=min(workers, len(to_move)),
520520
thread_name_prefix=self.__class__.__name__,
521521
) as executor:
522522
futures = [

onetl/file/file_uploader/file_uploader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def _bulk_upload(
544544

545545
if workers > 1:
546546
with ThreadPoolExecutor(
547-
max_workers=max(workers, len(to_upload)),
547+
max_workers=min(workers, len(to_upload)),
548548
thread_name_prefix=self.__class__.__name__,
549549
) as executor:
550550
futures = [

0 commit comments

Comments
 (0)