KarlQuant commited on
Commit
7ce66f0
Β·
verified Β·
1 Parent(s): e5ef6b2

Update websocket_hub.py

Browse files
Files changed (1) hide show
  1. websocket_hub.py +4 -9
websocket_hub.py CHANGED
@@ -459,17 +459,12 @@ class TradeLogParser:
459
 
460
 
461
  # ── Bootstrap parser ─────────────────────────────────────────────────────────────────
462
- # Try the richer version from hub_dashboard_service first; fall back to built-in above.
 
463
 
464
  _LOG_DIR = os.environ.get("RANKER_LOG_DIR", "/app/ranker_logs")
465
-
466
- try:
467
- from hub_dashboard_service import TradeLogParser as _ExternalParser
468
- _trade_parser = _ExternalParser(log_dir=_LOG_DIR)
469
- logger.info("βœ… TradeLogParser loaded from hub_dashboard_service")
470
- except Exception:
471
- _trade_parser = TradeLogParser(log_dir=_LOG_DIR)
472
- logger.info("βœ… TradeLogParser using built-in fallback")
473
 
474
 
475
  # ══════════════════════════════════════════════════════════════════════════════════════
 
459
 
460
 
461
  # ── Bootstrap parser ─────────────────────────────────────────────────────────────────
462
+ # Use built-in TradeLogParser only β€” importing hub_dashboard_service causes a crash
463
+ # because it instantiates Flask, starts threads, and calls app.run() at module level.
464
 
465
  _LOG_DIR = os.environ.get("RANKER_LOG_DIR", "/app/ranker_logs")
466
+ _trade_parser = TradeLogParser(log_dir=_LOG_DIR)
467
+ logger.info("βœ… TradeLogParser using built-in")
 
 
 
 
 
 
468
 
469
 
470
  # ══════════════════════════════════════════════════════════════════════════════════════