From 8d7e07d046f84114591fad70b6cd5a99dae1a581 Mon Sep 17 00:00:00 2001 From: Sambhav Dixit <94298612+sambhavnoobcoder@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:51:11 +0530 Subject: [PATCH] update __init__ Added - Tasks - max_workers --- swarms/structs/concurrent_workflow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swarms/structs/concurrent_workflow.py b/swarms/structs/concurrent_workflow.py index 10950879..d63152d4 100644 --- a/swarms/structs/concurrent_workflow.py +++ b/swarms/structs/concurrent_workflow.py @@ -112,6 +112,7 @@ class ConcurrentWorkflow(BaseSwarm): return_str_on: bool = False, agent_responses: list = [], auto_generate_prompts: bool = False, + max_workers: int = None, *args, **kwargs, ): @@ -132,9 +133,12 @@ class ConcurrentWorkflow(BaseSwarm): self.return_str_on = return_str_on self.agent_responses = agent_responses self.auto_generate_prompts = auto_generate_prompts + self.max_workers = max_workers or os.cpu_count() + self.tasks = [] # Initialize tasks list self.reliability_check() + def reliability_check(self): try: logger.info("Starting reliability checks")