清理已移除服务的残留环境变量和测试引用

- .env.example:移除 PROMETHEUS/ALERTMANAGER/GRAFANA/ALERT_RELAY 端口配置
- .env.example:移除 TELEGRAM_ALERT_* 市场提醒配置
- test_bot_runtime_coordinator:移除 trade_alert_push 断言
This commit is contained in:
2569718930@qq.com
2026-05-14 18:45:34 +08:00
parent f4a37e4bdd
commit a79abc02de
2 changed files with 1 additions and 17 deletions
+1 -13
View File
@@ -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=
########################################
-4
View File
@@ -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"