移除市场监控推送功能及相关代码

- telegram_push.py: 删除 MARKET_MONITOR_CITIES/INTERVAL、_build_market_monitor_message、
  _run_market_monitor_cycle、start_market_monitor_push_loop、_format_percent/_format_prob
- telegram_chat_ids.py: 删除 get_market_monitor_chat_ids_from_env
- runtime_coordinator.py: 删除 _start_market_monitor_push_loop 及调用
- 移除 #市场监控 hashtag
This commit is contained in:
2569718930@qq.com
2026-05-17 20:22:42 +08:00
parent 07f61f8ca9
commit c74c193b02
4 changed files with 12 additions and 196 deletions
-28
View File
@@ -84,7 +84,6 @@ class StartupCoordinator:
def start_all(self) -> RuntimeStatus:
loops = [
self._start_airport_high_freq_loop(),
self._start_market_monitor_push_loop(),
self._start_dashboard_prewarm_loop(),
self._start_polygon_wallet_loop(),
self._start_polymarket_wallet_activity_loop(),
@@ -176,33 +175,6 @@ class StartupCoordinator:
),
)
def _start_market_monitor_push_loop(self) -> LoopStatus:
enabled = _env_bool("TELEGRAM_MARKET_MONITOR_PUSH_ENABLED", True)
chat_ids = import_module(
"src.utils.telegram_chat_ids"
).get_market_monitor_chat_ids_from_env()
telegram_push = import_module("src.utils.telegram_push")
interval = int(getattr(telegram_push, "MARKET_MONITOR_INTERVAL_SEC", 60))
cities_count = len(getattr(telegram_push, "MARKET_MONITOR_CITIES", []))
details = {
"mode": "market-monitor-periodic",
"interval_sec": interval,
"cities_count": cities_count,
"chat_targets": len(chat_ids),
"window": "every 60s, available Polymarket scans only",
}
validation_error = None if chat_ids else "missing_TELEGRAM_MARKET_MONITOR_CHAT_IDS"
return self._start_with_validation(
key="market_monitor_push",
label="市场监控频道推送",
configured_enabled=enabled,
details=details,
validation_error=validation_error,
starter=lambda: telegram_push.start_market_monitor_push_loop(
self.bot,
),
)
def _start_dashboard_prewarm_loop(self) -> LoopStatus:
enabled = _env_bool("POLYWEATHER_DASHBOARD_PREWARM_ENABLED", False)
interval = max(30, _env_int("POLYWEATHER_PREWARM_INTERVAL_SEC", 300))