catchup = False, why still two schedule runs are scheduled?

本小妞迷上赌 提交于 2019-12-24 19:23:06

问题


I've simple DAG: (Airflow v1.10.16, using SequentialExecutor on localhost machine)

  • start_date set in past
  • catchup = False
default_args = {'owner': 'test_user', 
                'start_date': datetime(2019, 12, 1, 1, 00, 00),}

graph1 = DAG(dag_id = 'test_dag', default_args=default_args,
             schedule_interval=timedelta(days=1),
             catchup = False)

t = PythonOperator(task_id='t', python_callable=my_func, dag=graph1)

as per code comments

:param catchup: Perform scheduler catchup (or only run latest)?

I expected when the scheduler comes up, it's supposed to schedule this dag run only once in past date than now. However, the behavior i'm experiencing is: the scheduler is scheduling recent two runs (instead just one, the latest one)

I activated the scheduler on 2019-12-09 04:03:00Z (= now) and here's Task Instances scheduled runs:

Can someone clarify why 2 runs in past date were scheduled instead just one? is it some bug or something wrong in my understanding?

来源:https://stackoverflow.com/questions/59260404/catchup-false-why-still-two-schedule-runs-are-scheduled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!