clusterjob/__init__.py
def status(self):
        """Return the job status as one of the codes defined in the
        `clusterjob.status` module.
        finished, communicate with the cluster to determine the job's status.
        """
        if self._status >= COMPLETED:
            return self._status
        else:
            for i in range(0, 26):
                try:
                    cmd = self.backend.cmd_status(self, finished=False)
                    response = self._run_cmd(cmd, self.remote, ignore_exit_code=True,
                                             ssh=self.ssh)
                    status = self.backend.get_status(response, finished=False)
                    if status is None:
                        cmd = self.backend.cmd_status(self, finished=True)
                        response = self._run_cmd(cmd, self.remote,
                                                 ignore_exit_code=True, ssh=self.ssh)
                        status = self.backend.get_status(response, finished=True)
                    if status is not None:
                        break
                except StatusParseError:
                    self._logger.warning("Status message for job could not be parsed. Retrying. Try number %d of %d"%(i+1, 25))
                    time.sleep(0.5)
                    if i == 25:
                        raise

            prev_status = self._status
            self._status = status
            if self._status not in STATUS_CODES:
                raise StatusParseError("Invalid status code %s"% self._status)
            if prev_status != self._status:
                if self._status >= COMPLETED:
                    self.run_epilogue()
                self.dump()
            return self._status
Return the job status as one of the codes defined in the
        `clusterjob.status` module.
        finished, communicate with the cluster to determine the job's status.
        
Return the job status as one of the codes defined in the
`clusterjob.status` module.
finished, communicate with the cluster to determine the job's status.
Return the job status as one of the codes defined in the ` clusterjob . status ` module . finished communicate with the cluster to determine the job ' s status .
def status(self):
        if self._status >= COMPLETED:
            return self._status
        else:
            for i in range(0, 26):
                try:
                    cmd = self.backend.cmd_status(self, finished=False)
                    response = self._run_cmd(cmd, self.remote, ignore_exit_code=True,
                                             ssh=self.ssh)
                    status = self.backend.get_status(response, finished=False)
                    if status is None:
                        cmd = self.backend.cmd_status(self, finished=True)
                        response = self._run_cmd(cmd, self.remote,
                                                 ignore_exit_code=True, ssh=self.ssh)
                        status = self.backend.get_status(response, finished=True)
                    if status is not None:
                        break
                except StatusParseError:
                    self._logger.warning("Status message for job could not be parsed. Retrying. Try number %d of %d"%(i+1, 25))
                    time.sleep(0.5)
                    if i == 25:
                        raise
            prev_status = self._status
            self._status = status
            if self._status not in STATUS_CODES:
                raise StatusParseError("Invalid status code %s"% self._status)
            if prev_status != self._status:
                if self._status >= COMPLETED:
                    self.run_epilogue()
                self.dump()
            return self._status
def status ( self ) : if self . _status >= COMPLETED : return self . _status else : for i in range ( 0 , 26 ) : try : cmd = self . backend . cmd_status ( self , finished = False ) response = self . _run_cmd ( cmd , self . remote , ignore_exit_code = True , ssh = self . ssh ) status = self . backend . get_status ( response , finished = False ) if status is None : cmd = self . backend . cmd_status ( self , finished = True ) response = self . _run_cmd ( cmd , self . remote , ignore_exit_code = True , ssh = self . ssh ) status = self . backend . get_status ( response , finished = True ) if status is not None : break except StatusParseError : self . _logger . warning ( "Status message for job could not be parsed. Retrying. Try number %d of %d" % ( i + 1 , 25 ) ) time . sleep ( 0.5 ) if i == 25 : raise prev_status = self . _status self . _status = status if self . _status not in STATUS_CODES : raise StatusParseError ( "Invalid status code %s" % self . _status ) if prev_status != self . _status : if self . _status >= COMPLETED : self . run_epilogue ( ) self . dump ( ) return self . _status
Return the job status as one of the codes defined in the
`clusterjob.status` module.
Return the job status as one of the codes defined in the ` clusterjob . status ` module .
"""Return the job status as one of the codes defined in the
        `clusterjob.status` module.
        finished, communicate with the cluster to determine the job's status.
        """
self