Periodically get status of a job with specified job id `jobId`.
Do so until job has finished or failed.

@param {String} jobId - Job id
511498
function(jobId) {
			var isFinished = function(res) {
				return res && res.status &&
					(res.status === 'finished' || res.status === 'failed')
			}

			var poll = function() {
				IOD.status({ jobId: jobId }, function(err, res) {
					// Emits err as first argument
					if (err) IOD.eventEmitter.emit(jobId, err)
					else if (isFinished(res)) {
						IOD.eventEmitter.emit(jobId, null, res)
						sendCallback(res)
					}
					else setTimeout(poll, IODOpts.pollInterval)
				})
			}

			setTimeout(poll, IODOpts.pollInterval)
		}
406694
def get_results(self, job_id):
        
        url = self._url('%s/results' % job_id)
        return self.client.get(url)
624287
public function getJob($jobId)
    {
        $url = parse_url($this->getBaseUrl());
        return $this->get("https://{$url['host']}/queue/job/{$jobId}")->send()->json();
    }
635963
private synchronized JobMonitor getJobMonitor(JobStatus status) {
    UUID jobId = status.getJobId();
    JobMonitor monitor = monitors.get(jobId);
    if (monitor == null) {
      monitor = new JobMonitor(factory.createProgressMonitor(status.getDescription()));
      monitors.put(jobId, monitor);
    }
    return monitor;
  }
564020
def wait_for_job(job_number)
      authenticate

      # Wait for the job to complete or hit the timeout.
      start = Time.new
      job = repo.job(job_number)
      ilog.start_threaded("Waiting for job #{job_number} to complete.") do |s|
        while !job.finished? && Time.new - start < @timeout
          s.continue("Job status: #{job.state}")
          sleep 10
          job.reload
        end

        if job.finished?
          s.success
        else
          s.failure("Job #{job_number} did not complete within time limit of " \
            "#{@timeout} seconds")
        end
      end
    end
700986
def mark_job_as_completed(job_id, data=None):
    
    update_dict = {
        "status": "complete",
        "data": json.dumps(data),
        "finished_timestamp": datetime.datetime.now(),
    }
    _update_job(job_id, update_dict)
910997
def get_status(self):
        
        if self.n_total == 0:
            return JobStatus.no_job
        elif self.n_done == self.n_total:
            return JobStatus.done
        elif self.n_failed > 0:
            # If more that a quater of the jobs fail, fail the whole thing
            if self.n_failed > self.n_total / 4.:
                return JobStatus.failed
            return JobStatus.partial_failed
        elif self.n_running > 0:
            return JobStatus.running
        elif self.n_pending > 0:
            return JobStatus.pending
        return JobStatus.ready
799779
protected synchronized void handleJobStatusChange(final String jobId, final Status status) {
    final BlockingStatus block = this.map.get(jobId);
    if (block != null) {
      block.changeStatus(status);
    }
  }
1340369
@Override
  public Job getJob(final JobId id) {
    log.debug("getting job: {}", id);
    final ZooKeeperClient client = provider.get("getJobId");
    return getJob(client, 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 ''
86281
public <T> JobStatus<T> getJobStatus(JobStatus<T> status) {
        return complete(getJobStatusAsync(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)
311075
def stats_job(self, job_id):
        
        with self._sock_ctx() as socket:
            if hasattr(job_id, 'job_id'):
                job_id = job_id.job_id
            self._send_message('stats-job {0}'.format(job_id), socket)
            body = self._receive_data_with_prefix(b'OK', socket)
            job_status = yaml_load(body)
            return job_status
1022589
def job(self, job_id):
        
        path = '/ws/v1/history/mapreduce/jobs/{jobid}'.format(jobid=job_id)

        return self.request(path)
1346092
def status(self, job_ids):
        '''  

        '''

        logging.debug("Checking status of : {0}".format(job_ids))
        for job_id in self.resources:
            poll_code = self.resources[job_id]['proc'].poll()
            if self.resources[job_id]['status'] in ['COMPLETED', 'FAILED']:
                continue

            if poll_code is None:
                self.resources[job_id]['status'] = 'RUNNING'
            elif poll_code == 0 and self.resources[job_id]['status'] != 'RUNNING':
                self.resources[job_id]['status'] = 'COMPLETED'
            elif poll_code < 0 and self.resources[job_id]['status'] != 'RUNNING':
                self.resources[job_id]['status'] = 'FAILED'

        return [self.resources[jid]['status'] for jid in job_ids]
1273881
function PendingJob(worker, id, resolve, reject) {
  this.worker = worker;
  this.id = id;
  this.job = co.job(resolve, reject);
  this.timer = null;
}
1140542
def getJob(self, jobID):
        
        url = self._url + "/jobs/%s" % (jobID)
        return GPJob(url=url,
                     securityHandler=self._securityHandler,
                     proxy_port=self._proxy_port,
                     proxy_url=self._proxy_url)