Return the job artifact built by the parser.
498229
def get_artifact(self):
        """"""
        self.artifact[self.parser.name] = self.parser.get_artifact()
        return self.artifact
379052
def parse_job_files(self):
        """"""
        repo_jobs = []
        for rel_job_file_path, job_info in self.job_files.items():
            LOGGER.debug("Checking for job definitions in %s", rel_job_file_path)
            jobs = self.parse_job_definitions(rel_job_file_path, job_info)
            LOGGER.debug("Found %d job definitions in %s", len(jobs), rel_job_file_path)
            repo_jobs.extend(jobs)
        if not repo_jobs:
            LOGGER.info("No job definitions found in repo '%s'", self.repo)
        else:
            LOGGER.info(
                "Found %d job definitions in repo '%s'", len(repo_jobs), self.repo
            )
            # LOGGER.debug(json.dumps(repo_jobs, indent=4))
        return repo_jobs
451126
def _build_job_meta(cls, job_dir):
        
        meta_file = os.path.join(job_dir, JOB_META_FILE)
        meta = parse_json(meta_file)

        if not meta:
            job_name = job_dir.split("/")[-1]
            user = os.environ.get("USER", None)
            meta = {
                "job_id": job_name,
                "job_name": job_name,
                "user": user,
                "type": "ray",
                "start_time": os.path.getctime(job_dir),
                "end_time": None,
                "best_trial_id": None,
            }

        if meta.get("start_time", None):
            meta["start_time"] = timestamp2date(meta["start_time"])

        return meta
197594
def get_jobs(plugin_name,
             verify_job=True, conn=None):
    
    job_cur = _jobs_cursor(plugin_name).run(conn)
    for job in job_cur:
        if verify_job and not verify(job, Job()):
            continue #to the next job... warn?
        yield job
510504
def job():
	""
	j1 = random.choice(phrases.jobs1)
	j2 = random.choice(phrases.jobs2)
	j3 = random.choice(phrases.jobs3)
	return '%s %s %s' % (j1, j2, j3)
1114415
def _from_api_repr(cls, resource):
        """"""
        job_id = resource.get("jobId")
        project = resource.get("projectId")
        location = resource.get("location")
        job_ref = cls(job_id, project, location)
        return job_ref
1042077
def get_artifact(job_name,filename)
      @artifact = job.find_artifact(job_name)
      response = make_http_request(Net::HTTP::Get.new(@artifact))
      if response.code == "200"
        File.write(File.expand_path(filename), response.body)
      else
        raise "Couldn't get the artifact"
      end
    end
863101
def getContainerName(job):
    """"""
    return '--'.join([str(job),
                      base64.b64encode(os.urandom(9), b'-_').decode('utf-8')])\
                      .replace("'", '').replace('"', '').replace('_', '')
426549
def jenkins(self):
        """"""
        job_name = self.format['jenkins_job_name'].format(**self.data)
        job = {'name': job_name}

        return job
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)
584876
def find_cached_job(jid):
    '''
    
    '''
    serial = salt.payload.Serial(__opts__)
    proc_dir = os.path.join(__opts__['cachedir'], 'minion_jobs')
    job_dir = os.path.join(proc_dir, six.text_type(jid))
    if not os.path.isdir(job_dir):
        if not __opts__.get('cache_jobs'):
            return ('Local jobs cache directory not found; you may need to'
                    ' enable cache_jobs on this minion')
        else:
            return 'Local jobs cache directory {0} not found'.format(job_dir)
    path = os.path.join(job_dir, 'return.p')
    with salt.utils.files.fopen(path, 'rb') as fp_:
        buf = fp_.read()
    if buf:
        try:
            data = serial.loads(buf)
        except NameError:
            # msgpack error in salt-ssh
            pass
        else:
            if isinstance(data, dict):
                # if not a dict, this was an invalid serialized object
                return data
    return None
253527
def cache_job(self, jid, id_, ret, fun):
        '''
        
        '''
        self.returners['{0}.returner'.format(self.opts['master_job_cache'])]({'jid': jid,
                                                                              'id': id_,
                                                                              'return': ret,
                                                                              'fun': fun})
388637
def get_logs(self, job_id):
        """"""
        response, http_response = self._client.jobs.get_logs(job_id=job_id).\
            result()
        if http_response.status_code == 404:
            raise HTTPNotFound('The given job ID was not found. Error: {}'.
                               format(http_response.data))
        return http_response.text
1245810
def _artifacts(self):
        """"""
        if '_artifacts' not in self._memo:
            json = _get_url(self._artifacts_url).json()
            self._memo['_artifacts'] = json['artifacts']
        return self._memo['_artifacts']
453626
def job(func_or_queue, connection=None, *args, **kwargs):
    """"""
    decorated_func = _job(func_or_queue, connection=connection, *args, **kwargs)

    if callable(func_or_queue):
        @wraps(decorated_func)
        def wrapper(*args, **kwargs):
            with log.fields(uuid=uuid.uuid4(),
                            job_name=decorated_func.__name__):
                return decorated_func(*args, **kwargs)
        return wrapper
    else:
        def decorator(func):
            @decorated_func
            @wraps(func)
            def wrapper(*args, **kwargs):
                with log.fields(uuid=uuid.uuid4(),
                                job_name=func.__name__):
                    return func(*args, **kwargs)
            return wrapper
        return decorator
353653
def serialize_job(job):
    """"""
    d = dict(
        id=job.get_id(),
        uri=url_for('jobs.get_job', job_id=job.get_id(), _external=True),
        status=job.get_status(),
        result=job.result
    )
    return d
807075
def get_parser(cls):
        """"""
        organizer = cls()
        organizer.setup_parser()
        organizer._finish_parser()
        return organizer.parser