def breakup(self, state, partner): brothers = self.query(type(partner)) f = requester.say_goodbye(state.agent, partner.recipient, brothers) f.add_callback(fiber.drop_param, self._do_breakup, partner) return f
def on_shutdown(self, agent): agent.log('Shutdown handler sending goodbye, for ' 'agent %r partner %r.', agent, self) brothers = agent.query_partners(type(self)) return requester.say_goodbye(agent, self.recipient, brothers)