Next commit is monitor.py that reads analyst.py also! This version to safety.

This commit is contained in:
Kalzu Rekku
2026-01-14 00:11:15 +02:00
parent 5d2aa8f499
commit f47652b0b9

View File

@@ -81,7 +81,7 @@ def get_onramp_panel():
data = query_onramp("status")
if not data:
LAG_HISTORY.clear() # Clear history if service goes down
return Panel(Text("OFFLINE", style="bold red"), title="[2] Onramp Service (Python)", border_style="red")
return Panel(Text("OFFLINE", style="bold red"), title="[2] Onramp Service (Go)", border_style="red")
# 1. Calculate Instant Lag
last_ts = data.get('last_ts', 0) / 1000
@@ -108,7 +108,7 @@ def get_onramp_panel():
content.append(f", {avg_1m:.2f}s/1m", style="dim" if avg_1m < 2 else "yellow")
content.append(f", {avg_5m:.2f}s/5m", style="dim" if avg_5m < 2 else "yellow")
return Panel(content, title="[2] Onramp Service (Python)", border_style="blue")
return Panel(content, title="[2] Onramp Service (Go)", border_style="blue")
def get_market_table():
res = query_onramp("live")
@@ -148,7 +148,7 @@ def main():
layout = make_layout()
with Live(layout, refresh_per_second=2, screen=True):
while True:
layout["header"].update(Panel(Text(f"BYBIT BTC UNIFIED MONITOR | {datetime.now().strftime('%H:%M:%S')}", justify="center", style="bold white on blue")))
layout["header"].update(Panel(Text(f"BYBIT BTCUSDT UNIFIED MONITOR | {datetime.now().strftime('%H:%M:%S')}", justify="center", style="bold white on blue")))
layout["input_svc"].update(get_input_panel())
layout["onramp_svc"].update(get_onramp_panel())
layout["market"].update(get_market_table())