-
Checked other resources
Commit to Help
Example Codedef _prepare_next_tasks(
checkpoint: Checkpoint,
processes: Mapping[str, PregelNode],
channels: Mapping[str, BaseChannel],
managed: ManagedValueMapping,
config: RunnableConfig,
step: int,
*,
for_execution: bool,
manager: Union[None, ParentRunManager, AsyncParentRunManager] = None,
) -> tuple[Checkpoint, Union[list[PregelTaskDescription], list[PregelExecutableTask]]]:
... Descriptionwe are using langgraph v0.0.55, and here is the problem:
System Infolanggraph v0.0.55 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey there, @Fnck! I'm here to help you with any bugs, questions, or contributions. Feel free to ask me anything while you wait for a human maintainer. The issue you're encountering with the end node being executed twice in a workflow with multiple branches converging into a single end node is likely related to how dependencies are managed and checked within the
By ensuring that dependencies are correctly checked and managed, and by verifying that tasks are not added multiple times to the task list, you can prevent the end node from being executed twice [1][2][3]. |
Beta Was this translation helpful? Give feedback.
-
It's closed. |
Beta Was this translation helpful? Give feedback.
Hey there, @Fnck! I'm here to help you with any bugs, questions, or contributions. Feel free to ask me anything while you wait for a human maintainer.
The issue you're encountering with the end node being executed twice in a workflow with multiple branches converging into a single end node is likely related to how dependencies are managed and checked within the
PregelNode
andTaskExecutor
classes.Dependency Management: The
PregelNode
class handles task dependencies through theTaskExecutor
class, specifically in thecheck_dependency
method. This method checks if all dependencies of a given task are either completed or not failed/pending: