Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Aug 17, 2023
2 parents b448bbd + 801fff2 commit 5f0f86a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docs/changelog/0.9.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
0.9.1 (2023-08-17)
==================

Bug Fixes
---------

- Fixed bug then number of threads created by ``FileDownloader`` / ``FileUploader`` / ``FileMover`` was
not ``min(workers, len(files))``, but ``max(workers, len(files))``. leading to create too much workers
on large files list.
1 change: 1 addition & 0 deletions docs/changelog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

DRAFT
NEXT_RELEASE
0.9.1
0.9.0
0.8.1
0.8.0
Expand Down
2 changes: 1 addition & 1 deletion onetl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1
2 changes: 1 addition & 1 deletion onetl/file/file_downloader/file_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def _bulk_download(

if workers > 1:
with ThreadPoolExecutor(
max_workers=max(workers, len(to_download)),
max_workers=min(workers, len(to_download)),
thread_name_prefix=self.__class__.__name__,
) as executor:
futures = [
Expand Down
2 changes: 1 addition & 1 deletion onetl/file/file_mover/file_mover.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def _bulk_move(

if workers > 1:
with ThreadPoolExecutor(
max_workers=max(workers, len(to_move)),
max_workers=min(workers, len(to_move)),
thread_name_prefix=self.__class__.__name__,
) as executor:
futures = [
Expand Down
2 changes: 1 addition & 1 deletion onetl/file/file_uploader/file_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def _bulk_upload(

if workers > 1:
with ThreadPoolExecutor(
max_workers=max(workers, len(to_upload)),
max_workers=min(workers, len(to_upload)),
thread_name_prefix=self.__class__.__name__,
) as executor:
futures = [
Expand Down

0 comments on commit 5f0f86a

Please sign in to comment.