示例#1
0
文件: partners.py 项目: zaheerm/feat
 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
示例#2
0
文件: partners.py 项目: zaheerm/feat
 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)