def issue_next_command(self):
        if self.debug: self.logger.write("State", "Pending commands: %s" % str(self.pendingcommands))
        if self.debug: self.logger.write("State", "Pending commandset: %s" % str(self.pendingcommandset))
        if len(self.pendingcommands) == 0:
            return
        smallestcommandnumber = sorted(self.pendingcommands.keys())[0]
        if smallestcommandnumber in self.pendingcommands:
            if self.active:
                self.do_command_propose_from_pending(smallestcommandnumber)
            else:
                self.do_command_prepare_from_pending(smallestcommandnumber)
dataset/ETHPy150Open denizalti/concoord/concoord/replica.py/Replica.issue_next_command/original