Skip to content

Commit

Permalink
youuuuuuutubedl: fix thread_pool minimum size
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Nov 3, 2022
1 parent 49da95d commit d945669
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion automon/integrations/youuuuuuutubedl/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
class ThreadPool:

@staticmethod
def config_thread_pool(thread_pool: int) -> ThreadPoolExecutor:
def config_thread_pool(thread_pool: int = 1) -> ThreadPoolExecutor:
"""Configure threading pool
thread_pool: must be > 0
"""
if not thread_pool:
thread_pool = 1
return ThreadPoolExecutor(max_workers=thread_pool)

0 comments on commit d945669

Please sign in to comment.