fix: wecom-alert 发送失败时在日志留档报警内容
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user