Exemplo n.º 1
0
def get_jobs():
    schedd = htcondor.Schedd()
    jobs = schedd.query()
    for job in jobs:
        job["FixedJobStatus"] = get_efectiv_job_status(job["JobStatus"], job["OnExitHold"], job["HoldReasonCode"],
                                                       job["HoldReasonSubCode"])
        yield job
Exemplo n.º 2
0
def get_jobs():
    schedd = htcondor.Schedd()
    jobs = schedd.query()
    for job in jobs:
        job["FixedJobStatus"] = get_efectiv_job_status(
            job["JobStatus"], job["OnExitHold"], job["HoldReasonCode"],
            job["HoldReasonSubCode"])
        yield job
Exemplo n.º 3
0
def get_job_info(job_uuid):
    ret = {}
    schedd = htcondor.Schedd()
    jobs = schedd.query('GridResource=="%s"' % str(job_uuid))
    if not jobs:
        return None
    job = jobs[0]
    job["FixedJobStatus"] = get_efectiv_job_status(job["JobStatus"], job["OnExitHold"], job.get("HoldReasonCode", None),
                                                   job["HoldReasonSubCode"])
    for key in job.keys():
        if key in JOB_INFO_KEYS:
            ret[JOB_INFO_KEYS[key]] = job[key]
    return ret
Exemplo n.º 4
0
def get_job_info(job_uuid):
    ret = {}
    schedd = htcondor.Schedd()
    jobs = schedd.query('GridResource=="%s"' % str(job_uuid))
    if not jobs:
        return None
    job = jobs[0]
    job["FixedJobStatus"] = get_efectiv_job_status(
        job["JobStatus"], job["OnExitHold"], job.get("HoldReasonCode", None),
        job["HoldReasonSubCode"])
    for key in job.keys():
        if key in JOB_INFO_KEYS:
            ret[JOB_INFO_KEYS[key]] = job[key]
    return ret