def _on_agent_removed(self, sender: str, msg: AgentRemovedMessage, t: float): self.logger.debug('AgentRemovedMessage from %s : %s', sender, msg) self.send_to_orchestrator( AgentStoppedMessage(self.agent.name, self.agent.metrics())) self.agent.stop()
def _on_stop_request(self, sender: str, msg: StopAgentMessage, t: float): self.logger.debug('StopAgentMessage from %s : %s', sender, msg) self.send_to_orchestrator( AgentStoppedMessage(self.agent.name, self.agent.metrics())) self.agent.stop()