MCPcopy Create free account
hub / github.com/Louisym/MiniCC / shutdown_all

Method shutdown_all

tutorials/13_multi_agent_coordination.py:400–409  ·  view source on GitHub ↗

关闭所有 Worker

(self)

Source from the content-addressed store, hash-verified

398 return "\n".join([f" - {r}" for r in results])
399
400 def shutdown_all(self):
401 """关闭所有 Worker"""
402 for name in self.workers:
403 self.mailbox.send(AgentMessage(
404 from_agent=self.identity.name,
405 to_agent=name,
406 msg_type=MessageType.SHUTDOWN,
407 content="Task complete, shutting down",
408 ))
409 print(f" [Leader] 发送关闭请求给 {name}")
410
411
412# ============================================================

Callers 1

demo_four_phase_workflowFunction · 0.95

Calls 2

AgentMessageClass · 0.85
sendMethod · 0.80

Tested by

no test coverage detected