mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-26 15:41:58 -06:00
27 lines
648 B
Python
27 lines
648 B
Python
"""Health check HTTP interface for the Engine."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from flask import Blueprint, Flask, jsonify
|
|
|
|
from Data.Engine.services.container import EngineServiceContainer
|
|
|
|
blueprint = Blueprint("engine_health", __name__)
|
|
|
|
|
|
def register(app: Flask, _services: EngineServiceContainer) -> None:
|
|
"""Attach health-related routes to *app*."""
|
|
|
|
if "engine_health" not in app.blueprints:
|
|
app.register_blueprint(blueprint)
|
|
|
|
|
|
@blueprint.route("/health", methods=["GET"])
|
|
def health() -> object:
|
|
"""Return a basic liveness response."""
|
|
|
|
return jsonify({"status": "ok"})
|
|
|
|
|
|
__all__ = ["register", "blueprint"]
|