Fájl részletek

Ezen az oldalon egy konkrét fájl aktuális állapotát tudod megnézni.

Vissza a fájltérképhez Csak változott Stratégia-labor Monitor főoldal
Fájl útvonala
/opt/bots/saturnus/app/health_bp.py
Létezik most?
IGEN
Aktuális státusz
UNCHANGED
Méret
803
Módosítás ideje
1770152544.3562102
Korábbi baseline időpont
1770152544.3562102
SHA256 rövid

Előnézet (első 120 sor)

from __future__ import annotations

from datetime import datetime, timezone
from zoneinfo import ZoneInfo

from flask import Blueprint, jsonify

TZ_DEFAULT = "Europe/Budapest"

health_bp = Blueprint("health", __name__)


@health_bp.get("/health")
def health():
    """
    Hard rule: /health must never raise, must not touch state.json, must not call external services.
    """
    tz = TZ_DEFAULT
    try:
        now_local = datetime.now(ZoneInfo(tz)).isoformat()
    except Exception:
        tz = "UTC"
        now_local = datetime.now(timezone.utc).isoformat()

    return jsonify(
        ui={
            "exchange": "Binance",
            "ok": True,
            "time_local": now_local,
            "time_utc": datetime.now(timezone.utc).isoformat(),
            "tz": tz,
        }
    ), 200

Csak változott diff sorok

Teljes diff

[INFO] Nincs tartalmi eltérés a baseline és az aktuális fájl között.