MCPcopy Index your code
hub / github.com/google/adk-python / _make_nodes_sequential

Function _make_nodes_sequential

src/google/adk/cli/agent_test_runner.py:231–250  ·  view source on GitHub ↗
(obj, visited=None)

Source from the content-addressed store, hash-verified

229
230
231def _make_nodes_sequential(obj, visited=None):
232 if visited is None:
233 visited = set()
234
235 if id(obj) in visited:
236 return
237 visited.add(id(obj))
238
239 from google.adk.workflow._parallel_worker import _ParallelWorker
240 from google.adk.workflow._workflow import Workflow
241
242 if isinstance(obj, Workflow):
243 obj.max_concurrency = 1
244 if obj.graph and obj.graph.nodes:
245 for node in obj.graph.nodes:
246 _make_nodes_sequential(node, visited)
247 elif isinstance(obj, _ParallelWorker):
248 obj.max_concurrency = 1
249 if hasattr(obj, "_node"):
250 _make_nodes_sequential(obj._node, visited)
251
252
253def _get_all_agent_names(obj, visited=None):

Callers 2

test_agent_replayFunction · 0.85
rebuild_testsFunction · 0.85

Calls 2

setFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected