Check if a job is enabled.

		:param job_id: Job identifier to check the status of.
		:type job_id: :py:class:`uuid.UUID`
		:rtype: bool
436897
def job_is_enabled(self, job_id):
		
		job_id = normalize_job_id(job_id)
		job_desc = self._jobs[job_id]
		return job_desc['enabled']
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']
855901
def set_status(db, job_id, status):
    
    assert status in (
        'created', 'submitted', 'executing', 'complete', 'aborted', 'failed'
    ), status
    if status in ('created', 'complete', 'failed', 'aborted'):
        is_running = 0
    else:  # 'executing'
        is_running = 1
    if job_id < 0:
        rows = db('SELECT id FROM job ORDER BY id DESC LIMIT ?x', -job_id)
        if not rows:
            return 0
        job_id = rows[-1].id
    cursor = db('UPDATE job SET status=?x, is_running=?x WHERE id=?x',
                status, is_running, job_id)
    return cursor.rowcount
1067097
def job_data(cls, job_id=dummy_job_id, status=None, code=None, error=None, **kwargs):
        
        return dict(job_id=job_id, status=status, code=code, error=error)
1164134
def enabled(job_label, runas=None):
    '''
    
    '''
    overrides_data = dict(plistlib.readPlist(
        '/var/db/launchd.db/com.apple.launchd/overrides.plist'
    ))
    if overrides_data.get(job_label, False):
        if overrides_data[job_label]['Disabled']:
            return False
        else:
            return True
    else:
        return False
862282
def check_job(self, job_id):
        
        resp = self._call(endpoint='status', data={'job_id': job_id})
        map = {'id': 'job_id', 'status': 'status_code', 'type': 'type_code'}
        job_status_args = {map.get(k, k): v for k, v in resp.items()}
        return JobStatus(**job_status_args)
949614
def getJobInfo(self, jobId):
        
        job = self._jtracker.getJobInfo(jobId)
        if job is not None:
            return SparkJobInfo(jobId, job.stageIds(), str(job.status()))
52162
def fetch(job_or_job_id)

      if job_or_job_id.respond_to?(:job_id)
        [ job_or_job_id, job_or_job_id.job_id ]
      else
        [ job(job_or_job_id), job_or_job_id ]
      end
    end
783266
def get_status_job(self, id_job, hub=None, group=None, project=None,
                       access_token=None, user_id=None):
        
        if access_token:
            self.req.credential.set_token(access_token)
        if user_id:
            self.req.credential.set_user_id(user_id)
        if not self.check_credentials():
            respond = {}
            respond["status"] = 'Error'
            respond["error"] = "Not credentials valid"
            return respond
        if not id_job:
            respond = {}
            respond["status"] = 'Error'
            respond["error"] = "Job ID not specified"
            return respond

        url = get_job_url(self.config, hub, group, project)

        url += '/' + id_job + '/status'

        status = self.req.get(url)

        return 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)
977756
def isRunning(self, serviceJobNode):
        
        return (not self.jobStore.fileExists(serviceJobNode.startJobStoreID)) and self.isActive(serviceJobNode)
107788
def ready(self, job):
        
        no_deps = len(job.depends_on) == 0
        all_complete = all(j.is_complete() for j in self.active_jobs
                if j.alias in job.depends_on)
        none_failed = not any(True for j in self.failed
                if j.alias in job.depends_on)
        queue_is_open = len(self.running) < self.MAX_CONCURRENT_JOBS
        return queue_is_open and (no_deps or (all_complete and none_failed))
1071101
def job_delete(self, job_id, wait=True):
		
		job_id = normalize_job_id(job_id)
		self.logger.info('deleting job with id: ' + str(job_id) + ' and callback function: ' + self._jobs[job_id]['callback'].__name__)
		job_desc = self._jobs[job_id]
		with self._job_lock:
			job_desc['enabled'] = False
			if wait and self.job_is_running(job_id):
				job_desc['job'].join()
			del self._jobs[job_id]
268999
def get_job_status(self, job_id):
        
        response = self._client.describe_jobs(jobs=[job_id])

        # Error checking
        status_code = response['ResponseMetadata']['HTTPStatusCode']
        if status_code != 200:
            msg = 'Job status request received status code {0}:\n{1}'
            raise Exception(msg.format(status_code, response))

        return response['jobs'][0]['status']
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
466474
def check_job(cls, job_details):
        
        return check_log(job_details.logfile, cls.string_exited, cls.string_successful)
589252
def show(self, job_id, return_dict=False):
        
        rtn = self.execute_command('SHOW', job_id)

        if return_dict:
            grouped = self._grouper(rtn, 2)
            rtn = dict((a, b) for a, b in grouped)

        return rtn