Get a list of Jobs.
497903
def list(self, search_opts=None, limit=None,
             marker=None, sort_by=None, reverse=None):
        """"""
        query = base.get_query_string(search_opts, limit=limit, marker=marker,
                                      sort_by=sort_by, reverse=reverse)
        url = "/jobs%s" % query
        return self._page(url, 'jobs', limit)
409617
def _processReadyJobs(self):
        """"""
        logger.debug('Built the jobs list, currently have %i jobs to update and %i jobs issued',
                     len(self.toilState.updatedJobs), self.getNumberOfJobsIssued())

        updatedJobs = self.toilState.updatedJobs # The updated jobs to consider below
        self.toilState.updatedJobs = set() # Resetting the list for the next set

        for jobGraph, resultStatus in updatedJobs:
            self._processReadyJob(jobGraph, resultStatus)
570828
def list(self, argv):
        """"""

        def read(job):
            for key in sorted(job.content.keys()):
                # Ignore some fields that make the output hard to read and
                # that are available via other commands.
                if key in ["performance"]: continue
                print("%s: %s" % (key, job.content[key]))

        if len(argv) == 0:
            index = 0
            for job in self.service.jobs:
                print("@%d : %s" % (index, job.sid))
                index += 1
            return

        self.foreach(argv, read)
1309274
def last_job_statuses(self) -> List[str]:
        """"""
        statuses = []
        for status in self.jobs.values_list('status__status', flat=True):
            if status is not None:
                statuses.append(status)
        return statuses
864550
def get_jobs_events_from_sequence(user, sequence):
    """"""

    args = schemas.args(flask.request.args.to_dict())

    if user.is_not_super_admin():
        raise dci_exc.Unauthorized()

    query = sql.select([models.JOBS_EVENTS]). \
        select_from(models.JOBS_EVENTS.join(models.JOBS,
                    models.JOBS.c.id == models.JOBS_EVENTS.c.job_id)). \
        where(_TABLE.c.id >= sequence)
    sort_list = v1_utils.sort_query(args['sort'], _JOBS_EVENTS_COLUMNS,
                                    default='created_at')
    query = v1_utils.add_sort_to_query(query, sort_list)

    if args.get('limit', None):
        query = query.limit(args.get('limit'))
    if args.get('offset', None):
        query = query.offset(args.get('offset'))

    rows = flask.g.db_conn.execute(query).fetchall()

    query_nb_rows = sql.select([func.count(models.JOBS_EVENTS.c.id)])
    nb_rows = flask.g.db_conn.execute(query_nb_rows).scalar()

    return json.jsonify({'jobs_events': rows, '_meta': {'count': nb_rows}})
827501
def jobs(self):
        
        if self._job_manager is None:
            self._job_manager = JobManager(session=self._session)
        return self._job_manager
1129031
def get_jobs(self, full=None, limit=None, skip=None, start=None, end=None,
                 output_format=None):
        """"""
        method = 'GET'
        endpoint = '/rest/v1/{}/jobs'.format(self.client.sauce_username)
        data = {}
        if full is not None:
            data['full'] = full
        if limit is not None:
            data['limit'] = limit
        if skip is not None:
            data['skip'] = skip
        if start is not None:
            data['from'] = start
        if end is not None:
            data['to'] = end
        if output_format is not None:
            data['format'] = output_format
        if data:
            endpoint = '?'.join([endpoint, urlencode(data)])
        return self.client.request(method, endpoint)
206433
def ListJobs(self, token=None):
    """"""
    del token
    return [job.cron_job_id for job in data_store.REL_DB.ReadCronJobs()]
580832
def _listeq_to_dict(jobconfs):
    """"""
    if not isinstance(jobconfs, dict):
        jobconfs = dict(x.split('=', 1) for x in jobconfs)
    return dict((str(k), str(v)) for k, v in jobconfs.items())
318910
def job(self, name):
        
        for job in self.jobs():
            if job.data.name == name:
                return job
969539
def current_jobs(self):
    

    jobs = []
    with synchronized(self.__queue):
      for worker in self.__threads:
        with synchronized(worker):
          if worker.current:
            jobs.append(worker.current)
    return jobs
916702
def list(context, job_id):
    

    result = analytic.list(context, job_id=job_id)
    utils.format_output(result, context.format)
936978
public List<CarbonJobInfo> getJobList()
	{
		Element statusList = element.getChild("JobStatusList");

		if (statusList != null)
		{
			List<CarbonJobInfo> jobs = new ArrayList<CarbonJobInfo>();

			for (Element job : statusList.getChildren())
			{
				jobs.add(new CarbonJobInfo(job));
			}

			return jobs;
		}
		else if (getJobInfo() != null)
		{
			return Collections.singletonList(getJobInfo());
		}
		else
		{
			return Collections.emptyList();
		}
	}
1259767
public Map<String, Job> getJobs(String view) throws IOException {
        return getJobs(null, view);
    }
1198372
def filter_jobs(sacct_jobs, failed=True):
    """"""
    categories = FAILED_CATEGORIES if failed else NORMAL_CATEGORIES
    filtered_jobs = [job for job in sacct_jobs if job['state'] in categories]
    return filtered_jobs
212350
def get_jobs_from_queue(self, queue: str, max_jobs: int) -> List[Job]:
        """"""
        jobs_json_string = self._run_script(
            self._get_jobs_from_queue,
            self._to_namespaced(queue),
            self._to_namespaced(RUNNING_JOBS_KEY.format(self._id)),
            JobStatus.RUNNING.value,
            max_jobs
        )

        jobs = json.loads(jobs_json_string.decode())
        jobs = [Job.deserialize(job) for job in jobs]

        return jobs
599617
def list_jobs(self, project):
        
        url = self._build_url(constants.LIST_JOBS_ENDPOINT)
        params = {'project': project}
        jobs = self.client.get(url, params=params, timeout=self.timeout)
        return jobs