예제 #1
0
def health_check():
    args = {
        "verbose": parse_bool_param(request.args.get("verbose")),
        "healthy_block_diff": request.args.get("healthy_block_diff", type=int),
        "enforce_block_diff": parse_bool_param(request.args.get("enforce_block_diff"))
    }

    (health_results, error) = get_health(args)
    return success_response_backwards_compat(
        health_results,
        500 if error else 200
    )
예제 #2
0
def ipld_block_check():
    use_redis_cache = parse_bool_param(request.args.get("use_cache"))
    latest_ipld_indexed_block, latest_indexed_ipld_block_hash = get_latest_ipld_indexed_block(use_redis_cache)

    return success_response(
        {"db":{"number": latest_ipld_indexed_block, "blockhash": latest_indexed_ipld_block_hash}}
    )
예제 #3
0
def block_check():
    args = {
        "verbose": parse_bool_param(request.args.get("verbose")),
        "healthy_block_diff": request.args.get("healthy_block_diff", type=int),
        "enforce_block_diff": True,
    }

    (health_results, error) = get_health(args, use_redis_cache=False)
    return success_response(health_results,
                            500 if error else 200,
                            sign_response=False)
예제 #4
0
def health_check():
    args = {
        "verbose":
        parse_bool_param(request.args.get("verbose")),
        "healthy_block_diff":
        request.args.get("healthy_block_diff", type=int),
        "enforce_block_diff":
        parse_bool_param(request.args.get("enforce_block_diff")),
        "challenge_events_age_max_drift":
        request.args.get("challenge_events_age_max_drift", type=int),
        "plays_count_max_drift":
        request.args.get("plays_count_max_drift", type=int),
        "reactions_max_indexing_drift":
        request.args.get("reactions_max_indexing_drift", type=int),
        "reactions_max_last_reaction_drift":
        request.args.get("reactions_max_last_reaction_drift", type=int),
    }

    (health_results, error) = get_health(args)
    return success_response(health_results,
                            500 if error else 200,
                            sign_response=False)