(self, __context: Any)
| 159 | _inner_node: base_node.BaseNode | None = PrivateAttr(default=None) |
| 160 | |
| 161 | def model_post_init(self, __context: Any) -> None: |
| 162 | super().model_post_init(__context) |
| 163 | if self.parallel_worker: |
| 164 | # If parallel_worker is True, we wrap a clone of the current node |
| 165 | # in a _ParallelWorker. We disable parallel_worker on the clone |
| 166 | # to avoid infinite recursion when its run() method is called. |
| 167 | # The cloned node preserves the class identity and behavior of the |
| 168 | # original (essential for LlmAgent and Workflow subclasses). |
| 169 | worker_node = self.model_copy(update={"parallel_worker": False}) |
| 170 | |
| 171 | inner = parallel_worker_lib._ParallelWorker(node=worker_node) |
| 172 | self._inner_node = inner |
| 173 | # Synchronize rerun_on_resume with the inner node. |
| 174 | self.rerun_on_resume = inner.rerun_on_resume |
| 175 | |
| 176 | @override |
| 177 | def model_copy( |
nothing calls this directly
no test coverage detected