def notify(self, args): self.logger.debug('Notify: %s', args) if self.predecessor_id is None or contains_predecessor( self.id, self.predecessor_id, args['predecessor_id']): self.predecessor_id = args['predecessor_id'] self.predecessor_addr = args['predecessor_addr'] self.logger.info(self)
def notify(self, args): """ Process NOTIFY message. Updates predecessor pointers. Parameters: args (dict): id and addr of the predecessor node """ self.logger.debug('Notify: %s', args) if self.predecessor_id is None or contains_predecessor( self.id, self.predecessor_id, args['predecessor_id']): self.predecessor_id = args['predecessor_id'] self.predecessor_addr = args['predecessor_addr'] self.logger.info(self)