Retrieve the detail for a job.
18597
function getJobDetail(jobId, resultFunc) {
  $.ajax({
    type: 'GET',
    url: 'command/get_job_detail',
    dataType: 'text',
    data: {'mapreduce_id': jobId},
    statusCode: {
      404: function() {
        setButter('job ' + jobId + ' was not found.', true);
      }
    },
    error: function(request, textStatus) {
      getResponseDataJson(textStatus);
    },
    success: function(data, textStatus, request) {
      var response = getResponseDataJson(null, data);
      if (response) {
        resultFunc(jobId, response);
      }
    }
  });
}
855818
def get_job_details(job_id,
                    deployment_name,
                    token_manager=None,
                    app_url=defaults.APP_URL):
    

    jobs = get_jobs(deployment_name,
                    token_manager=token_manager,
                    app_url=app_url)

    for job in jobs:
        if job['id'] == job_id:
            return job

    raise JutException('Unable to find job with id "%s"' % job_id)
877591
def get_job_id_from_name(self, job_name):
        """"""
        jobs = self._client.list_jobs(jobQueue=self._queue, jobStatus='RUNNING')['jobSummaryList']
        matching_jobs = [job for job in jobs if job['jobName'] == job_name]
        if matching_jobs:
            return matching_jobs[0]['jobId']
75041
def sid(self, spec):
        """"""
        if spec.startswith('@'):
            index = int(spec[1:])
            jobs = self.service.jobs.list()
            if index < len(jobs):
                return jobs[index].sid
        return spec
265549
def log_detail(job_id=None, task_name=None, log_id=None):
        
        jobs = get_jobs()
        job = [job for job in jobs if str(job['job_id']) == job_id][0]
        return render_template('log_detail.html',
                               job=job,
                               task_name=task_name,
                               task=[task for task in job['tasks']
                                     if task['name'] == task_name][0],
                               log_id=log_id)
581553
def get(self, *jids):
        ''''''
        if jids:
            return [
                Job(self.client, **j) for j in
                json.loads(self.client('multiget', *jids))]
        return []
588733
def get_by_job(cls, job_id):
        """"""
        try:
            return cls.query.filter_by(
                job_id=job_id
            ).one()
        except NoResultFound:
            raise CrawlerJobNotExistError(job_id)
6493
def collection_for_job(cls, job):
        
        return cls.collection(job_model_repr=job.get_model_repr(), identifier=getattr(job, '_cached_identifier', job.identifier.hget()))
1107713
def job_result(project_id, job_id, opts = {})
      data, _status_code, _headers = job_result_with_http_info(project_id, job_id, opts)
      return data
    end
1180834
async def result_info(self) -> Optional[JobResult]:
        
        v = await self._redis.get(result_key_prefix + self.job_id, encoding=None)
        if v:
            return unpickle_result(v)
1302448
def _get_metadata(job_id):
    """"""
    # Avoid SQLAlchemy "Unicode type received non-unicode bind param value"
    # warnings.
    job_id = unicode(job_id)

    results = ENGINE.execute(
        METADATA_TABLE.select().where(
            METADATA_TABLE.c.job_id == job_id)).fetchall()
    metadata = {}
    for row in results:
        value = row['value']
        if row['type'] == 'json':
            value = json.loads(value)
        metadata[row['key']] = value
    return metadata
1028326
def getDetails(self):
        """"""

        response = self.pingdom.request('GET', 'checks/%s' % self.id)
        self.__addDetails__(response.json()['check'])
        return response.json()['check']
171985
def job_data(cls, job_id=dummy_job_id, branches=None, **kwargs):
        
        return dict(job_id=job_id, branches=branches or [])
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
42506
def get_job_ids(self):
        """"""
        if not self.parsed_response:
            return None
        try:
            job_ids = self.parsed_response["files"]["results.xml"]["job-ids"]
        except KeyError:
            return None
        if not job_ids or job_ids == [0]:
            return None
        return job_ids
372497
def get_job_id(self, response):
        """"""
        lines = [line.strip() for line in response.split("\n")
                if line.strip() != '']
        last_line = lines[-1]
        match = re.match('(\d+)\.[\w.-]+$', last_line)
        if match:
            return match.group(1)
        else:
            return None
821567
def retrieve_data jobName, _options = {}
      # TODO: add support for csv
      endpoint = "http://api.diffbot.com/v3/bulk/download/#{@token}-#{jobName}_data.json"
      JSON.parse(HTTParty.get(endpoint).body).each_pair do |key, value|
        self[key] = value
      end
    end