diff --git a/automon/integrations/youuuuuuutubedl/thread.py b/automon/integrations/youuuuuuutubedl/thread.py index b24e65cc..113aa628 100644 --- a/automon/integrations/youuuuuuutubedl/thread.py +++ b/automon/integrations/youuuuuuutubedl/thread.py @@ -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)