def get_job_status(self): jobstatus = 'UNKNOWN' jobid = self.get_jobid() if jobid != '' and jobid != '0': jobstatus = cluster.job_status(jobid) return jobstatus
def get_job_status(self): """ Get the status of a job given its jobid as assigned by the scheduler :param jobid: job id assigned by the scheduler :return: string from call to cluster.job_status or UNKNOWN. """ jobstatus = 'UNKNOWN' jobid = self.get_jobid() if jobid and jobid != '0': jobstatus = cluster.job_status(jobid) return jobstatus
def get_job_status(self, jobid=None): """ Get the status of a job given its jobid as assigned by the scheduler :param jobid: job id assigned by the scheduler :return: string from call to cluster.job_status or UNKNOWN. """ jobstatus = "UNKNOWN" if jobid == None: jobid = self.get_jobid() if jobid != "" and jobid != "0": jobstatus = cluster.job_status(jobid) return jobstatus