From a79abc02dec857f1925350109a522775c1f8b120 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Thu, 14 May 2026 18:45:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E5=B7=B2=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9A=84=E6=AE=8B=E7=95=99=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=92=8C=E6=B5=8B=E8=AF=95=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .env.example:移除 PROMETHEUS/ALERTMANAGER/GRAFANA/ALERT_RELAY 端口配置 - .env.example:移除 TELEGRAM_ALERT_* 市场提醒配置 - test_bot_runtime_coordinator:移除 trade_alert_push 断言 --- .env.example | 14 +------------- tests/test_bot_runtime_coordinator.py | 4 ---- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.env.example b/.env.example index c41552ac..865d3a9b 100644 --- a/.env.example +++ b/.env.example @@ -18,12 +18,6 @@ OPEN_METEO_DISK_CACHE_PATH=/var/lib/polyweather/open_meteo_cache.json UID=1000 GID=1000 POLYWEATHER_STATE_STORAGE_MODE=sqlite -POLYWEATHER_PROMETHEUS_PORT=9090 -POLYWEATHER_ALERTMANAGER_PORT=9093 -POLYWEATHER_ALERT_RELAY_PORT=9099 -POLYWEATHER_GRAFANA_PORT=3001 -POLYWEATHER_GRAFANA_ADMIN_USER=admin -POLYWEATHER_GRAFANA_ADMIN_PASSWORD=polyweather # Backend CORS allowlist. Add your Vercel production/preview domains when # NEXT_PUBLIC_POLYWEATHER_API_BASE_URL points browsers directly at this backend. WEB_CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000,https://polyweather-pro.vercel.app @@ -94,14 +88,8 @@ SUPABASE_SUB_CACHE_TTL_SEC=60 POLYWEATHER_BACKEND_ENTITLEMENT_TOKEN= ######################################## -# 5) Alerts / operations +# 5) Operations ######################################## -TELEGRAM_ALERT_PUSH_ENABLED=true -TELEGRAM_ALERT_PUSH_INTERVAL_SEC=300 -TELEGRAM_ALERT_PUSH_COOLDOWN_SEC=1800 -TELEGRAM_ALERT_MIN_TRIGGER_COUNT=2 -TELEGRAM_ALERT_MIN_SEVERITY=medium -TELEGRAM_ALERT_CITIES=ankara,london,paris,seoul,hong kong,shanghai,singapore,tokyo,tel aviv,toronto,buenos aires,wellington,new york,chicago,dallas,miami,atlanta,seattle,lucknow,sao paulo,munich POLYWEATHER_MONITORING_ALERT_CHAT_IDS= ######################################## diff --git a/tests/test_bot_runtime_coordinator.py b/tests/test_bot_runtime_coordinator.py index 79b3ba1a..a3d05fb1 100644 --- a/tests/test_bot_runtime_coordinator.py +++ b/tests/test_bot_runtime_coordinator.py @@ -6,7 +6,6 @@ class DummyBot: def test_startup_coordinator_respects_disable_flags(monkeypatch): - monkeypatch.setenv("TELEGRAM_ALERT_PUSH_ENABLED", "false") monkeypatch.setenv("POLYGON_WALLET_WATCH_ENABLED", "false") monkeypatch.setenv("POLYMARKET_WALLET_ACTIVITY_ENABLED", "false") monkeypatch.delenv("TELEGRAM_CHAT_ID", raising=False) @@ -21,9 +20,6 @@ def test_startup_coordinator_respects_disable_flags(monkeypatch): runtime = coordinator.start_all() loop_map = runtime.loop_map() - assert loop_map["trade_alert_push"].configured_enabled is False - assert loop_map["trade_alert_push"].started is False - assert loop_map["trade_alert_push"].reason == "disabled_by_env" assert loop_map["polygon_wallet_watch"].reason == "disabled_by_env" assert loop_map["polymarket_wallet_activity"].reason == "retired_replaced_by_market_monitor"