def periodic (self): # this one should shout its keys Master.periodic (self) if not self._terminate: # can't do it otherwise # self.sync () pass else: self.debug (1, 'you might be pregnant...')
def periodic(self): # this one should shout its keys Master.periodic(self) if not self._terminate: # can't do it otherwise # self.sync () pass else: self.debug(1, 'you might be pregnant...')
def periodic (self): self.debug (1, 'periodic') Master.periodic (self) if not self._terminate: # we migh been asked to finish right now. self.stabilize () if random (10)==1: peer= self._peers.getRandomNavel () # don't gossip w/ myself! if not peer==self._self: self.gossip (peer) self.debug (1, "%s <-- %d --> %s" % (self._pred and self._pred.key () or None, self.key (), self._succ and self._succ.key () or None)) else: self.debug (1, 'you might be pregnant...')