def startup(self, state): desc = state.medium.get_descriptor() f = fiber.succeed() if state.partners.shard is None: f.add_callback(fiber.drop_param, self.start_join_shard_manager) # this agent is restarted by the agency not the monitor agent # for this reason we need to mind the restarted notifications # in a special way (ourselves) if desc.instance_id > 1: own = self.get_own_address() fibers = list() for partner in state.partners.all: fibers.append(requester.notify_restarted(self, partner.recipient, own, own)) if fibers: fl = fiber.FiberList(fibers, consumeErrors=True) f.chain(fl) return f
def notify_restarted(self, state, recp, origin, new_address): return requester.notify_restarted(self, recp, origin, new_address)