功能:心跳同时发送到 vsp-service 和 WVP 平台

新增 WVP_API_URL 环境变量,心跳同时上报到两个地址,
解决前端从 WVP 读设备状态显示离线的问题。
This commit is contained in:
2026-03-19 09:58:24 +08:00
parent 9c39913a55
commit 2ea35ad5d3
2 changed files with 17 additions and 8 deletions

View File

@@ -93,6 +93,7 @@ class COSConfig:
class AlarmUploadConfig:
"""告警上报配置"""
cloud_api_url: str = "http://localhost:8000"
wvp_api_url: str = "" # WVP 平台地址(心跳同步用)
edge_token: str = ""
retry_max: int = 3
retry_interval: int = 5
@@ -263,6 +264,7 @@ class Settings:
self.alarm_upload = AlarmUploadConfig(
cloud_api_url=os.getenv("CLOUD_API_URL", "http://localhost:8000"),
wvp_api_url=os.getenv("WVP_API_URL", ""),
edge_token=os.getenv("EDGE_TOKEN", ""),
retry_max=int(os.getenv("ALARM_RETRY_MAX", "3")),
retry_interval=int(os.getenv("ALARM_RETRY_INTERVAL", "5")),