移除 PolyWeather 市场提醒功能及监控基础设施

- 删除 market_alert_engine.py:交易预警引擎
- 删除 alertmanager_telegram_relay.py:Alertmanager 到 Telegram 转发
- 移除 telegram_push.py 中市场监控推送循环
- 移除 runtime_coordinator.py 中 trade_alert_push 协程
- 移除 docker-compose.yml 中 Prometheus/Alertmanager/Grafana 服务
- 移除 monitoring/ 目录:prometheus/alertmanager/grafana 配置

Tested: ruff check . ✓
This commit is contained in:
2569718930@qq.com
2026-05-14 18:23:39 +08:00
parent 5ad89b4c29
commit eb056a890b
11 changed files with 2 additions and 2069 deletions
+2 -35
View File
@@ -83,7 +83,6 @@ class StartupCoordinator:
def start_all(self) -> RuntimeStatus:
loops = [
self._start_trade_alert_loop(),
self._start_airport_high_freq_loop(),
self._start_dashboard_prewarm_loop(),
self._start_polygon_wallet_loop(),
@@ -152,37 +151,6 @@ class StartupCoordinator:
details=details,
)
def _start_trade_alert_loop(self) -> LoopStatus:
enabled = _env_bool("TELEGRAM_ALERT_PUSH_ENABLED", True)
chat_ids = get_telegram_chat_ids_from_env()
interval = max(60, _env_int("TELEGRAM_ALERT_PUSH_INTERVAL_SEC", 1800))
cities_count = _parse_csv_count(os.getenv("TELEGRAM_ALERT_CITIES"))
details = {
"mode": "critical-alerts",
"interval_sec": interval,
"cities_count": cities_count,
"chat_targets": len(chat_ids),
"alert_cooldown_sec": max(
60,
_env_int("TELEGRAM_ALERT_PUSH_COOLDOWN_SEC", 21600),
),
"min_trigger_count": max(1, _env_int("TELEGRAM_ALERT_MIN_TRIGGER_COUNT", 3)),
"min_severity": str(os.getenv("TELEGRAM_ALERT_MIN_SEVERITY") or "high").strip().lower(),
"daily_signal_cap": "none",
}
validation_error = None if chat_ids else "missing_TELEGRAM_CHAT_IDS"
return self._start_with_validation(
key="trade_alert_push",
label="市场监控推送",
configured_enabled=enabled,
details=details,
validation_error=validation_error,
starter=lambda: import_module("src.utils.telegram_push").start_trade_alert_push_loop(
self.bot,
self.config,
),
)
def _start_airport_high_freq_loop(self) -> LoopStatus:
enabled = _env_bool("TELEGRAM_AIRPORT_PUSH_ENABLED", True)
chat_ids = get_telegram_chat_ids_from_env()
@@ -269,10 +237,9 @@ class StartupCoordinator:
label="Polymarket 钱包异动监听(已停用)",
configured_enabled=False,
started=False,
reason="retired_replaced_by_market_monitor",
reason="retired",
details={
"replacement": "trade_alert_push",
"note": "wallet activity watcher retired in favor of market monitor digests and critical alerts",
"note": "wallet activity watcher retired",
},
)