GaryLeckey commited on
Commit
b18ef0d
·
verified ·
1 Parent(s): 3142d5f

Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode)

Browse files
Files changed (1) hide show
  1. aureon/saas/gateway.py +6 -3
aureon/saas/gateway.py CHANGED
@@ -660,15 +660,18 @@ def register_saas_routes(app: Any) -> Any:
660
  import pathlib, re, time as _time
661
  state_root = pathlib.Path(
662
  os.environ.get("SERO_RUNTIME_HOME", "aureon_fusion/state"))
663
- logs_dir = state_root.parent / "logs"
 
 
 
664
  if not logs_dir.is_dir():
665
  logs_dir = pathlib.Path("aureon_fusion/logs")
666
  trader = logs_dir / "organ_unified_market_trader.log"
667
  tail = trader.read_text(encoding="utf-8", errors="replace")[-8000:] if trader.is_file() else ""
668
  txt = tail.replace("\r\n", "\n")
669
  binance_ready = bool(re.search(r"BINANCE: spot_route_ready=True", txt))
670
- kraken_ready = not bool(re.search(r"KRAKEN\.* unavailable", txt))
671
- capital_ready = not bool(re.search(r"CAPITAL\.* unavailable", txt))
672
  alpaca_ready = "Alpaca API Error 401" not in txt and bool(re.search(r"ALPACA: spot_route_ready", txt))
673
  ts = _time.strftime("%Y-%m-%dT%H:%M:%SZ", _time.gmtime())
674
  return jsonify({
 
660
  import pathlib, re, time as _time
661
  state_root = pathlib.Path(
662
  os.environ.get("SERO_RUNTIME_HOME", "aureon_fusion/state"))
663
+ # Organ LOGS = WORKSPACE/logs; state = WORKSPACE/aureon_fusion/state
664
+ logs_dir = state_root.parent.parent / "logs"
665
+ if not logs_dir.is_dir():
666
+ logs_dir = state_root.parent / "logs"
667
  if not logs_dir.is_dir():
668
  logs_dir = pathlib.Path("aureon_fusion/logs")
669
  trader = logs_dir / "organ_unified_market_trader.log"
670
  tail = trader.read_text(encoding="utf-8", errors="replace")[-8000:] if trader.is_file() else ""
671
  txt = tail.replace("\r\n", "\n")
672
  binance_ready = bool(re.search(r"BINANCE: spot_route_ready=True", txt))
673
+ kraken_ready = "KRAKEN unavailable:" not in txt
674
+ capital_ready = "CAPITAL unavailable:" not in txt
675
  alpaca_ready = "Alpaca API Error 401" not in txt and bool(re.search(r"ALPACA: spot_route_ready", txt))
676
  ts = _time.strftime("%Y-%m-%dT%H:%M:%SZ", _time.gmtime())
677
  return jsonify({