Gets the job status.

        Return:
            str: The current status of the job
16764
def _update_status(self, sub_job_num=None):
        
        job_id = '%s.%s' % (self.cluster_id, sub_job_num) if sub_job_num else str(self.cluster_id)
        format = ['-format', '"%d"', 'JobStatus']
        cmd = 'condor_q {0} {1} && condor_history {0} {1}'.format(job_id, ' '.join(format))
        args = [cmd]
        out, err = self._execute(args, shell=True, run_in_job_dir=False)
        if err:
            log.error('Error while updating status for job %s: %s', job_id, err)
            raise HTCondorError(err)
        if not out:
            log.error('Error while updating status for job %s: Job not found.', job_id)
            raise HTCondorError('Job not found.')

        out = out.replace('\"', '')
        log.info('Job %s status: %s', job_id, out)

        if not sub_job_num:
            if len(out) >= self.num_jobs:
                out = out[:self.num_jobs]
            else:
                msg = 'There are {0} sub-jobs, but {1} status(es).'.format(self.num_jobs, len(out))
                log.error(msg)
                raise HTCondorError(msg)

        #initialize status dictionary
        status_dict = dict()
        for val in CONDOR_JOB_STATUSES.values():
            status_dict[val] = 0

        for status_code_str in out:
            status_code = 0
            try:
                status_code = int(status_code_str)
            except ValueError:
                pass
            key = CONDOR_JOB_STATUSES[status_code]
            status_dict[key] += 1

        return status_dict
384306
def xmlrpc_status(self):
        
        return ("""
        %i Jobs are still wating for execution
        %i Jobs are being processed
        %i Jobs are done
        """ %(self.task_store.partitions - 
                self.results - 
                len(self.scheduled_tasks),
              len(self.scheduled_tasks),
              self.results))
1285410
def status(self):
        
        try:
            return self.__dict__["status"]
        except (KeyError, ValueError):
            raise AttributeError(
                "Instrument(order_book_id={}) has no attribute 'status' ".format(self.order_book_id)
            )
820252
def job_status(self, project, job_id):
        
        all_jobs = self.list_jobs(project)
        for state in constants.JOB_STATES:
            job_ids = [job['id'] for job in all_jobs[state]]
            if job_id in job_ids:
                return state
        return ''
718452
def status(self) -> str:
        """"""
        # As status is a modifiable property, have to reload from the db.
        self._config = self._load_config()
        return self._config.get('status')
625903
def apps_installations_job_status_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/apps/installations/job_statuses/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
862282
def check_job(self, job_id):
        
        resp = self._call(endpoint='status', data={'job_id': job_id})
        map = {'id': 'job_id', 'status': 'status_code', 'type': 'type_code'}
        job_status_args = {map.get(k, k): v for k, v in resp.items()}
        return JobStatus(**job_status_args)
877149
def get_status(self):
        
        logger.debug("get server status")
        server_status = ctypes.c_int()
        cpu_status = ctypes.c_int()
        clients_count = ctypes.c_int()
        error = self.library.Srv_GetStatus(self.pointer, ctypes.byref(server_status),
                                           ctypes.byref(cpu_status),
                                           ctypes.byref(clients_count))
        check_error(error)
        logger.debug("status server %s cpu %s clients %s" %
                     (server_status.value, cpu_status.value,
                      clients_count.value))
        return snap7.snap7types.server_statuses[server_status.value], \
               snap7.snap7types.cpu_statuses[cpu_status.value], \
               clients_count.value
874606
public JobState getState() {
    if (this.completed) {
      if (this.successful) {
        return JobState.SUCCEEDED;
      } else {
        return JobState.FAILED;
      }
    } else {
      return JobState.RUNNING;
    }
    // return JobState.ofInt(this.status.getRunState());
  }
44349
def _update_statuses(self, sub_job_num=None):
        
        # initialize status dictionary
        status_dict = dict()

        for val in CONDOR_JOB_STATUSES.values():
            status_dict[val] = 0

        for node in self.node_set:
            job = node.job
            try:
                job_status = job.status
                status_dict[job_status] += 1
            except (KeyError, HTCondorError):
                status_dict['Unexpanded'] += 1

        return status_dict
1108287
def get_statusmsg(self) -> str:
        
        if self._last_status is None:
            return self._last_status
        return self._last_status.decode()
697332
def get_status(self, response, finished=False):
        """"""
        lines = [line.strip() for line in response.split("\n")
                if line.strip() != '']
        last_line = lines[-1]
        if last_line.startswith('qstat: Unknown Job'):
            return COMPLETED
        else:
            try:
                status = lines[-1].split()[4]
                return self.status_mapping[status]
            except (IndexError, KeyError):
                return None
897526
def apps_job_status_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/apps/job_statuses/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
786761
async def info(self) -> Optional[JobDef]:
        
        info = await self.result_info()
        if not info:
            v = await self._redis.get(job_key_prefix + self.job_id, encoding=None)
            if v:
                info = unpickle_job(v)
        if info:
            info.score = await self._redis.zscore(queue_name, self.job_id)
        return info
256662
def status():
    
    import pdb; pdb.set_trace()
    branch = git.branch
    issue = jira.get_issue(branch)
    if not issue:
        return

    # Print the title
    title = issue.fields.summary
    print "(%s) %s" % (branch, title)

    # Print the status
    status = issue.fields.status.name
    assignee = issue.fields.assignee.name
    in_progress = jira.get_datetime_issue_in_progress(issue)

    if in_progress:
        in_progress_string = in_progress.strftime("%a %x %I:%M %p")
        print '  Status: %s as of %s' % (status, in_progress_string)
    else:
        print '  Status: %s' % status

    print '  Assignee: %s' % assignee

    # Print the worklogs

    # Get the timespent and return 0m if it does not exist
    time_spent = '0m'
    try:
        time_spent = issue.fields.timetracking.timeSpent
    except:
        pass

    worklogs = jira.get_worklog(issue)
    print "\nTime logged (%s):" % time_spent
    if worklogs:
        for worklog in worklogs:
            worklog_hash = worklog.raw

            author = worklog_hash['author']['name']

            time_spent = worklog_hash.get('timeSpent', '0m')

            created = dateutil.parser.parse(worklog_hash['started'])
            created_pattern = '%a %x         '  # Adding extra space for formatting
            if not created.hour == created.minute == created.second == 0:
                created = created.astimezone(tzlocal())
                created_pattern = '%a %x %I:%M %p'
            comment = worklog_hash.get('comment', '<no comment>')

            updated_string = created.strftime(created_pattern)
            print "  %s - %s (%s): %s" % (updated_string, author, time_spent, comment)
    else:
        print "  No worklogs"

    cycle_time = jira.get_cycle_time(issue)
    if cycle_time:
        print '\nCycle Time: %.1f days' % cycle_time

    # Print the time elapsed since the last mark
    elapsed_time = jira.get_elapsed_time(issue)
    if elapsed_time:
        print '\n\033[0;32m%s elapsed\033[00m (use "jtime log ." to log elapsed time or "jtime log <duration> (ex. 30m, 1h etc.)" to log a specific amount of time)' % (elapsed_time)
    else:
        print '\n\033[0;32m0m elapsed\033[00m'
498014
def status(self):
        
        return {
            self.original: {
                'formatted_filename': self.out_location,
                'state': self.state,
                'messages': '\n\t'.join(self.messages),
            }
        }
631823
def status(self, job_id):
        
        check_jobid(job_id)

        queue = self._get_queue()
        if queue is None:
            raise QueueDoesntExist

        ret, output = self._call('%s %s' % (
                                 shell_escape(queue / 'commands/status'),
                                 job_id),
                                 True)
        if ret == 0:
            directory, result = output.splitlines()
            result = result.decode('utf-8')
            return RemoteQueue.JOB_DONE, PosixPath(directory), result
        elif ret == 2:
            directory = output.splitlines()[0]
            return RemoteQueue.JOB_RUNNING, PosixPath(directory), None
        elif ret == 3:
            raise JobNotFound
        else:
            raise RemoteCommandFailure(command="commands/status",
                                       ret=ret)