优化
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user