Spaces:
Runtime error
Runtime error
Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode)
Browse files659 unmodified lines660661662663664665666667668669670671672673674659 unmodified linesimport pathlib, re, time as _timestate_root = pathlib.Path(os.environ.get("SERO_RUNTIME_HOME", "aureon_fusion/state"))logs_dir = state_root.parent / "logs"if not logs_dir.is_dir():logs_dir = pathlib.Path("aureon_fusion/logs")trader = logs_dir / "organ_unified_market_trader.log"tail = trader.read_text(encoding="utf-8", errors="replace")[-8000:] if trader.is_file() else ""txt = tail.replace("\r\n", "\n")binance_ready = bool(re.search(r"BINANCE: spot_route_ready=True", txt))kraken_ready = not bool(re.search(r"KRAKEN\.* unavailable", txt))capital_ready = not bool(re.search(r"CAPITAL\.* unavailable", txt))alpaca_ready = "Alpaca API Error 401" not in txt and bool(re.search(r"ALPACA: spot_route_ready", txt))ts = _time.strftime("%Y-%m-%dT%H:%M:%SZ", _time.gmtime())return jsonify({659 unmodified lines660661662663664665666667668669670671672673674675676677659 unmodified linesimport pathlib, re, time as _timestate_root = pathlib.Path(os.environ.get("SERO_RUNTIME_HOME", "aureon_fusion/state"))# Organ LOGS = WORKSPACE/logs; state = WORKSPACE/aureon_fusion/statelogs_dir = state_root.parent.parent / "logs"if not logs_dir.is_dir():logs_dir = state_root.parent / "logs"if not logs_dir.is_dir():logs_dir = pathlib.Path("aureon_fusion/logs")trader = logs_dir / "organ_unified_market_trader.log"tail = trader.read_text(encoding="utf-8", errors="replace")[-8000:] if trader.is_file() else ""txt = tail.replace("\r\n", "\n")binance_ready = bool(re.search(r"BINANCE: spot_route_ready=True", txt))kraken_ready = "KRAKEN unavailable:" not in txtcapital_ready = "CAPITAL unavailable:" not in txtalpaca_ready = "Alpaca API Error 401" not in txt and bool(re.search(r"ALPACA: spot_route_ready", txt))ts = _time.strftime("%Y-%m-%dT%H:%M:%SZ", _time.gmtime())return jsonify({
aureon/saas/gateway.py+6-3