AWS Airflow 中是否有任何选项可以获取跳过的 dag 运行的警报邮件。
在我的例子中,对于一个 dag 有四个任务,每次运行都会在第三个任务中被跳过。我添加了 failure_callback 函数来获取失败的 dag 运行的通知。第三个任务被跳过,并且没有警报通知跳过的 dag 运行。有没有可能的方法来获取跳过的 dag 运行的通知
.
Every time the third task is skipped and the fourth task is in 'no status' state. So there is no execution in the fourth task. Is there any way to get it mail for the no status dag runs. Or is there any way to get the mail notification for the skipped ones.
def failire_callback():
if task_name is 't1':
print(" OUTPUT : t1 is failed")
elif task_name is 't2':
Print(" OUTPUT : t2 is failed")
elif task_name is 't3':
print(" OUTPUT : t3 is failed")
else
Print("OUTPUT : t4 is failed")
subject = Dag has failed
message = generate_html_template
send_email(to=IDs, subject = subject, html_content = message)
default_args = (
Provide_context = True
on_failure_callback = failure_callback
dag = dag
)
目前没有现成的方法来提醒跳过的任务。您可以在此处查看可用回调列表。