fix(P1): fund_flow_alert改走alert_helper统一网关(ACTION级)——替代直连5805旁路

This commit is contained in:
xxm
2026-08-19 14:25:29 +08:00
parent eda87ac2ee
commit 63db67079a
+3 -4
View File
@@ -72,11 +72,10 @@ def _is_watchlist(code):
def _send_xmpp(text):
"""XMPP 推送(知微 bridge"""
"""XMPP 推送——2026-08-19 P1 统一网关:走 alert_helper(内容型 ACTION 级,30行容量+5min去重"""
try:
payload = json.dumps({"to": "hmo@yoin.fun", "body": text, "type": "chat"}).encode("utf-8")
req = urllib.request.Request(XMPP_SEND, data=payload, headers={"Content-Type": "application/json"})
urllib.request.urlopen(req, timeout=5).read()
from alert_helper import notify, ACTION
notify("资金流异动", text, level=ACTION)
except Exception as e:
print(f"[XMPP失败] {e}", file=sys.stderr)