kyegomez / swarms

The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework Join our Community: https://discord.com/servers/agora-999382051935506503
https://docs.swarms.world
GNU Affero General Public License v3.0
1.79k stars 245 forks source link

Fix AttributeError in ConcurrentWorkflow by Properly Initializing Tasks List #613

Closed sambhavnoobcoder closed 4 weeks ago

sambhavnoobcoder commented 1 month ago

Description:

The ConcurrentWorkflow class was raising an AttributeError because the tasks attribute was not properly initialized in the class constructor. When the run() method attempted to access self.tasks, it failed because the attribute didn't exist. This caused workflows to fail when trying to execute tasks, particularly affecting use cases where tasks were added incrementally or when running multiple tasks in sequence.

Root Cause:

Solution:

The fix implements the following changes:

Benefits:

Breaking Changes:

Related Issues: Fixes #511


📚 Documentation preview 📚: https://swarms--613.org.readthedocs.build/en/613/