This commit is contained in:
沈健
2025-04-23 15:36:19 +08:00
parent d49b907f38
commit 66bb733a0b
+2 -1
View File
@@ -23,13 +23,14 @@ def send_dingding_alert(context):
},
"at": {"isAtAll": True}
}
print(message)
http_hook = HttpHook(method="POST", http_conn_id="dingding_webhook")
http_hook.run(
endpoint="robot/send",
data=json.dumps(message),
headers={"Content-Type": "application/json"}
)
print("success")
def fail_task():
raise ValueError("This task is designed to fail")