예제 #1
0
def info(job_id):
    with session_query() as session:
        job = Job.load(job_id, session)
        frontend_scan_id = job.scan.scan_id
        filename = job.filename
        probe = job.probename
        return (frontend_scan_id, filename, probe)
예제 #2
0
def _finish(job_id, status):
    with session_transaction() as session:
        job = Job.load(job_id, session)
        job.status = status
        job.ts_end = timestamp()
        job.update(['status', 'ts_end'], session)
        scan_id = job.scan.id
    scanctrl.check_finished(scan_id)
예제 #3
0
def duration(job_id):
    with session_query() as session:
        job = Job.load(job_id, session)
        return (job.ts_end - job.ts_start)
예제 #4
0
def set_taskid(job_id, task_id):
    with session_transaction() as session:
        job = Job.load(job_id, session)
        job.task_id = task_id