Beispiel #1
0
def handle_exception(job, exc_type, exc_value, tb_obj):
    exc_info_str = json.dumps({
        "message":
        str(exc_value),
        "traceback":
        Worker._get_safe_exception_string(
            traceback.format_exception(exc_type, exc_value, tb_obj))
    })

    job.failed_job_registry.add(job, exc_string=exc_info_str)

    return False
def handle_exception(job, exc_type, exc_value, tb_obj):
    failed_queue = get_failed_queue(redis_conn, job.__class__)

    exc_info_str = json.dumps({
        "message":
        str(exc_value),
        "traceback":
        Worker._get_safe_exception_string(
            traceback.format_exception(exc_type, exc_value, tb_obj))
    })

    failed_queue.quarantine(job, exc_info=exc_info_str)

    return False