气流:即使没有任务运行,DAG状态也成功

时间:2019-07-13 05:53:56

标签: airflow airflow-scheduler

在10次运行中的2次中,即使其中没​​有任何任务运行,DAG状态也会自动设置为成功。以下是传递的DAG参数及其树视图。

args = {
    'owner': 'xyz',
    'depends_on_past': False,
    'catchup': False,
    'start_date': datetime(2019, 7, 8),
    'email': ['a@b.c'],
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 0,
    'provide_context': True,
    'retry_delay': timedelta(minutes=2)
}

enter image description here

我将DAG作为这样的上下文传递:

with DAG(PARENT_DAG_NAME, default_args=args, schedule_interval='30 * * * *') as main_dag:
    task1 = DummyOperator(
    task_id='Raw_Data_Ingestion_Started',
    )
    task2 = DummyOperator(
    task_id='Raw_Data_Ingestion_Completed',
    )

    task1 >> task2

任何想法可能是什么问题?我需要在配置文件中进行更改吗?而且这种行为不是周期性的。

1 个答案:

答案 0 :(得分:0)

根据DummyOperator上的官方airflow documentation

  

实际上什么也不做的运算符。它可用于在DAG中对任务进行分组。

相关问题