Exemplo n.º 1
0
def ajax_job_logs(doc_id=None):
    if validate_csrf(request.headers.get(CSRF_TOKEN_H, None)):
        if doc_id:
            api_path = app_conf_get("JOB_ID_LOGS_ENPOINT")
        else:
            api_path = app_conf_get("JOB_LOGS_ENPOINT")
        return backend.ajax_logs(
            request, api_path, doc_id=doc_id, timeout=60 * 60 * 3)
    else:
        abort(403)
Exemplo n.º 2
0
def ajax_job_logs(doc_id=None):
    if validate_csrf(request.headers.get(CSRF_TOKEN_H, None)):
        if doc_id:
            api_path = app_conf_get("JOB_ID_LOGS_ENPOINT")
        else:
            api_path = app_conf_get("JOB_LOGS_ENPOINT")
        return backend.ajax_logs(
            request, api_path, doc_id=doc_id, timeout=60 * 60 * 3)
    else:
        abort(403)
Exemplo n.º 3
0
def ajax_build_logs(doc_id=None):
    if validate_csrf(request.headers.get(CSRF_TOKEN_H, None)):
        if doc_id:
            api_path = app_conf_get("DEFCONFIG_ID_LOGS_ENPOINT")
        else:
            api_path = app_conf_get("DEFCONFIG_LOGS_ENPOINT")
        return backend.ajax_logs(request,
                                 api_path,
                                 doc_id=doc_id,
                                 timeout=CACHE_TIME)
    else:
        abort(403)