【发布时间】:2022-01-14 12:00:19
【问题描述】:
1.4 与作曲家 2.0。
我有一个运行多个任务的 DAG,我遇到的问题是,当一个任务失败时,它无论如何都会运行下一个。
根据气流文档,这不应该是这种情况,而是在任务失败后终止 DAG 的执行。 任务是相互依赖的,所以如果一个失败,下一个将失败。 我希望万一任务失败,DAG的执行将被终止。
default_args = {
'owner': owner,
'start_date': datetime.datetime(2021, 12, 28 ,15 ,0 ,0 ), #2021-08-08 10:00:00 UTC-0
'email': email,
'email_on_failure': True,
'retries': 0, # Retry once before failing the task.
#'on_failure_callback': incident_pg, #ejecuta funcion en caso de que la tarea falle
}
with DAG(dag_id=inst_dag_id,
default_args = default_args,
catchup = True,
max_active_runs = 5,
#schedule_interval = None) as dag: #ejecucion manual
schedule_interval = "0 15 * * *" ) as dag:
【问题讨论】:
标签: airflow google-cloud-composer