15 lines
295 B
Python
15 lines
295 B
Python
from flask import Blueprint, jsonify
|
|
from prometheus_swarm.database import get_db
|
|
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
bp = Blueprint("healthz", __name__)
|
|
|
|
|
|
@bp.post("/healthz")
|
|
def healthz():
|
|
# Test database connection
|
|
_ = get_db()
|
|
return jsonify({"status": "ok"})
|