From aa9a021ac47dd616e2b83bd1ea1600f14555daf9 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Thu, 27 Aug 2026 09:43:26 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20wecom-alert=20=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E5=9C=A8=E6=97=A5=E5=BF=97=E7=95=99?= =?UTF-8?q?=E6=A1=A3=E6=8A=A5=E8=AD=A6=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flows/monitor/alert_failure.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flows/monitor/alert_failure.py b/flows/monitor/alert_failure.py index ca5b6ca..da84ded 100644 --- a/flows/monitor/alert_failure.py +++ b/flows/monitor/alert_failure.py @@ -111,7 +111,9 @@ def wecom_alert_failure(event: dict | str | None = None) -> dict: result["sent"] = send_markdown("\n".join(lines)) result.update({"flowName": flow_name or None, "runId": run_id}) - print(f"[wecom-alert] 已发送失败报警: {flow_name or resource_name} ({event_name})") + if not result["sent"]: + print(f"[wecom-alert] 报警内容(发送失败,留档): {' '.join(lines)[:400]}") + print(f"[wecom-alert] 已处理失败报警: {flow_name or resource_name} ({event_name})") except Exception as err: # noqa: BLE001 print(f"[wecom-alert] 报警流程异常(已吞掉,避免自我触发): {err}") return result