Use proxied manager's status to compute the real
        (stateful) status of job.
420677
def __status(self, job_directory, proxy_status):
        
        if proxy_status == status.COMPLETE:
            if not job_directory.has_metadata(JOB_FILE_POSTPROCESSED):
                job_status = status.POSTPROCESSING
            else:
                job_status = status.COMPLETE
        else:
            job_status = proxy_status
        return job_status
819532
def get_status(self, batch_id):
        
        with self._lock:
            if self._batch_committed(batch_id):
                return ClientBatchStatus.COMMITTED
            if batch_id in self._invalid:
                return ClientBatchStatus.INVALID
            if batch_id in self._pending:
                return ClientBatchStatus.PENDING
            return ClientBatchStatus.UNKNOWN
64208
def _updatePredecessorStatus(self, jobStoreID):
        
        if jobStoreID in self.toilState.serviceJobStoreIDToPredecessorJob:
            # Is a service job
            predecessorJob = self.toilState.serviceJobStoreIDToPredecessorJob.pop(jobStoreID)
            self.toilState.servicesIssued[predecessorJob.jobStoreID].pop(jobStoreID)
            if len(self.toilState.servicesIssued[predecessorJob.jobStoreID]) == 0: # Predecessor job has
                # all its services terminated
                self.toilState.servicesIssued.pop(predecessorJob.jobStoreID) # The job has no running services
                self.toilState.updatedJobs.add((predecessorJob, 0)) # Now we know
                # the job is done we can add it to the list of updated job files

        elif jobStoreID not in self.toilState.successorJobStoreIDToPredecessorJobs:
            #We have reach the root job
            assert len(self.toilState.updatedJobs) == 0
            assert len(self.toilState.successorJobStoreIDToPredecessorJobs) == 0
            assert len(self.toilState.successorCounts) == 0
            logger.debug("Reached root job %s so no predecessors to clean up" % jobStoreID)

        else:
            # Is a non-root, non-service job
            logger.debug("Cleaning the predecessors of %s" % jobStoreID)

            # For each predecessor
            for predecessorJob in self.toilState.successorJobStoreIDToPredecessorJobs.pop(jobStoreID):

                # Reduce the predecessor's number of successors by one to indicate the
                # completion of the jobStoreID job
                self.toilState.successorCounts[predecessorJob.jobStoreID] -= 1

                # If the predecessor job is done and all the successors are complete
                if self.toilState.successorCounts[predecessorJob.jobStoreID] == 0:

                    # Remove it from the set of jobs with active successors
                    self.toilState.successorCounts.pop(predecessorJob.jobStoreID)

                    if predecessorJob.jobStoreID not in self.toilState.hasFailedSuccessors:
                        # Pop stack at this point, as we can get rid of its successors
                        predecessorJob.stack.pop()

                    # Now we know the job is done we can add it to the list of updated job files
                    assert predecessorJob not in self.toilState.updatedJobs
                    self.toilState.updatedJobs.add((predecessorJob, 0))
29639
def status(name, sig=None):
    '''
    
    '''

    proxy_fn = 'dummy.service_status'
    resp = __proxy__[proxy_fn](name)
    if resp['comment'] == 'stopped':
        return False
    if resp['comment'] == 'running':
        return True
372248
def is_current_manager_equals_to(cls, pm):
        """"""
        if hasattr(cls, 'works_result'):
            return cls.works_result
        is_ok = bool(cls._try_get_current_manager() == pm)
        setattr(cls, 'works_result', is_ok)
        return is_ok
1353742
def say_status(status, message, log_status = true)
      Strainer.log.info("status: #{status}, message: #{message}")

      return if quiet?
      super(status, message, log_status)
    end
368448
def _StatusUpdateThreadMain(self):
    """"""
    while self._status_update_active:
      # Make a local copy of the PIDs in case the dict is changed by
      # the main thread.
      for pid in list(self._process_information_per_pid.keys()):
        self._CheckStatusAnalysisProcess(pid)

      self._UpdateForemanProcessStatus()

      if self._status_update_callback:
        self._status_update_callback(self._processing_status)

      time.sleep(self._STATUS_UPDATE_INTERVAL)
1100822
def status_search(self, status):
        """"""
        json = self._fetch_json()
        jobs = json['response']
        for job in jobs:
            job_info = jobs[job]
            if job_info['status'].lower() == status.lower():
                yield self._build_results(jobs, job)
229835
def status(config):
    """"""
    with open(config) as fh:
        config = yaml.safe_load(fh.read())
    jsonschema.validate(config, CONFIG_SCHEMA)
    last_index = get_incremental_starts(config, None)
    accounts = {}
    for (a, region), last in last_index.items():
        accounts.setdefault(a, {})[region] = last
    print(yaml.safe_dump(accounts, default_flow_style=False))
364236
def status(context):
    """"""
    context.obj.find_repo_type()
    context.obj.call([context.obj.vc_name, 'status'])
1060403
def state(self):
        
        state = self.get_ps('persona_state', False)
        return EPersonaState(state) if state else EPersonaState.Offline
127816
def status(name, sig=None):
    '''
    
    '''
    if sig:
        return bool(__salt__['status.pid'](sig))

    cmd = '{0} check {1}'.format(_cmd(), name)
    return not __salt__['cmd.retcode'](cmd)
1357702
def _check_mr_state(cls, state, mr_id):
    
    if state is None:
      logging.warning(
          "Mapreduce State for job %s is missing. Dropping Task.",
          mr_id)
      return False
    if not state.active:
      logging.warning(
          "Mapreduce %s is not active. Looks like spurious task "
          "execution. Dropping Task.", mr_id)
      return False
    return True
401543
def status(self):
        """"""
        # If there is no script it is either ready or a lost duplicate #
        if not self.script_path.exists:
            if self.name in     jobs.names: return "DUPLICATE"
            if self.name not in jobs.names: return "READY"
        # It is submitted already #
        if self.name in jobs.names:
            if jobs[self.name]['type'] == 'queued':  return "QUEUED"
            if jobs[self.name]['type'] == 'running': return "RUNNING"
        # So the script exists for sure but it is not in the queue #
        if not self.kwargs['out_file'].exists: return "ABORTED"
        # Let's look in log file #
        if 'CANCELED'          in self.log_tail: return "CANCELLED"
        if 'slurmstepd: error' in self.log_tail: return "CANCELLED"
        # It all looks good #
        if 'SLURM: end at'     in self.log_tail: return "FINISHED"
        # At this point we have no idea #
        return "INTERUPTED"
994797
def is_job_done(job_id, conn=None):
    
    result = False
    get_done = RBJ.get_all(DONE, index=STATUS_FIELD)
    for item in get_done.filter({ID_FIELD: job_id}).run(conn):
        result = item
    return result
212316
def update(self, status):
        
        data = values.of({'Status': status, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return VerificationInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
285480
def check_status(self):
        """"""
        # Recompute the status of the tasks
        # Ignore OK and LOCKED tasks.
        for task in self:
            if task.status in (task.S_OK, task.S_LOCKED): continue
            task.check_status()

        # Take into account possible dependencies. Use a list instead of generators
        for task in self:
            if task.status == task.S_LOCKED: continue
            if task.status < task.S_SUB and all(status == task.S_OK for status in task.deps_status):
                task.set_status(task.S_READY, "Status set to Ready")