feat(engine): add parallel execution support for iteration nodes#1131
Merged
hygao1024 merged 1 commit intoiflytek:mainfrom Apr 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces parallel execution capabilities for iteration nodes in the workflow engine. Key changes include the implementation of a parallel execution mode with configurable concurrency and error strategies (fail_fast, continue, ignore_error_output), the addition of isolated child engines for parallel batches, and deep copying of variable pools to prevent state sharing. The engine now also supports ordered event relaying from child iterations. Feedback highlights potential improvements in exception handling within the event relay logic and suggests optimizing task management in the queue consumption loop to avoid unnecessary task recreation.
| """ | ||
| try: | ||
| payload = done_task.result() | ||
| except (asyncio.CancelledError, Exception): |
Contributor
Comment on lines
+745
to
+747
| wait_tasks[asyncio.create_task(child_stream_queue.get())] = "stream" | ||
| if not queue_done_state["order"]: | ||
| wait_tasks[asyncio.create_task(child_order_queue.get())] = "order" |
Contributor
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Related Issue
Changes
Testing
Screenshots (if applicable)
Checklist