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