Example #1
0
 def start(self):
     oldstatus = self.status
     super().start()
     if oldstatus in Status.going():
         logger.info("{} is already {}, so start has no effect".
                     format(self, self.status.name))
     else:
         self.startNodestack()
         self.bootstrap()
Example #2
0
    def start(self):
        oldstatus = self.status
        super().start()
        if oldstatus in Status.going():
            logger.info("{} is already {}, so start has no effect".
                        format(self, self.status.name))
        else:
            self.startNodestack()
            self.startClientstack()

            self.elector = self.newPrimaryDecider()

            # if first time running this node
            if not self.nodestack.remotes:
                logger.info("{} first time running; waiting for key sharing..."
                            "".format(self))
            else:
                self.bootstrap()
Example #3
0
 def isGoing(self):
     """
     Is the status in Status.going()?
     """
     return self.status in Status.going()
Example #4
0
 def isReady(self):
     """
     Is the status in Status.ready()?
     """
     return self.status in Status.ready()