追赶实例之间的气流延迟

sum*_*tha 3 airflow airflow-scheduler

我有以下 dag 设置来运行 2015 年的追赶。对于每个执行日期,任务实例在一分钟内完成。但是,第二天的任务仅在 5 分钟内开始。例如,上午 10:00、上午 10:05、上午 10:10 等。我没有看到为任务实例指定 5 分钟间隔。如何修改 dag 以在前一个实例完成后立即触发?我正在使用气流版本 1.9.0

default_args = {
   'owner': 'ssnehalatha',
   'email': ['ssnehalatha@metromile.com'],
   'depends_on_past': False,
   'start_date': datetime(2015, 1, 1),
   'on_failure_callback': jira_failure_ticket,
   'trigger_rule': 'all_done',
   'retries': 1,
   'pool': 'python_sql_pool'
}

dag = DAG('daily_dag',
           schedule_interval='15 1 * * 0,1,2,3,4,5',
           default_args=default_args,
           dagrun_timeout=timedelta(hours=24),
           catchup=True)
Run Code Online (Sandbox Code Playgroud)

tob*_*bi6 5

如果我没记错的话,这与 中的调度程序设置有关airflow.cfg

[scheduler]

# The scheduler constantly tries to trigger new tasks (look at the
# scheduler section in the docs for more information). This defines
# how often the scheduler should run (in seconds).
scheduler_heartbeat_sec = 60
Run Code Online (Sandbox Code Playgroud)

编辑

您提到的两个参数的文档(来自https://github.com/apache/incubator-airflow/blob/master/UPDATING.md):

min_file_process_interval应该在多少时间后从文件系统中获取更新的 DAG。

dag_dir_list_interval调度程序应重新列出 DAG 目录内容的频率。如果在开发 +dags 时,它们没有被拾取,请查看此数字并在必要时减少它。

在我看来,它们更多的是用于检测更改的和新的 DAG文件,而不是执行任务