Exemplo n.º 1
0
def job_success(result, jobid):
    try:
        (frontend_scanid, filename, probe) = job_ctrl.info(jobid)
        log.info("scanid %s jobid:%d probe %s",
                 frontend_scanid,
                 jobid,
                 probe)
        celery_frontend.scan_result(frontend_scanid, filename, probe, result)
        job_ctrl.success(jobid)
    except:
        log.info("exception", exc_info=True)
        return
Exemplo n.º 2
0
def job_error(parent_taskid, jobid):
    try:
        (frontend_scanid, filename, probe) = job_ctrl.info(jobid)
        log.info("scanid %s jobid:%d probe %s",
                 frontend_scanid, jobid, probe)
        job_ctrl.error(jobid)
        result = {}
        result['status'] = -1
        result['name'] = probe
        result['error'] = "Brain job error"
        result['duration'] = job_ctrl.duration(jobid)
        celery_frontend.scan_result(frontend_scanid, filename, probe, result)
    except:
        log.info("exception", exc_info=True)
        return