什么时候评估气流损失定义? [英] When does a airflow dag definition get evaluated?

查看:59
本文介绍了什么时候评估气流损失定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个气流dag文件,该文件创建了这样的图形...

Suppose I have an airflow dag file that creates a graph like so...

def get_current_info(filename)
    current_info = {}
    <fill in info in current_info relevant for today's date for given file>
    return current_info

files = [
    get_current_info("file_001"),
    get_current_info("file_002"),
    ....
]

for f in files:
    <some BashOperator bo1 using f's current info dict>
    <some BashOperator bo2 using f's current info dict>
    ....

    bo1 >> bo2
    ....

因为current_info字典中的这些值用于定义dag定期更改(在这里每天更改),我想知道dag定义的更新过程/时间表。 (我每次运行都会打印current_info值,并且值似乎正在更新,但对这种情况的发生方式和时间感到好奇)。

Since these values in the current_info dict that is used to define the dag changes periodically (here, daily), I would like to know by what process / schedule the dag definition gets updated. (I print the current_info values each run and values appear to be updating, but curious as to how and when exactly this happens).

何时评估气流滞后定义?

When does a airflow dag definition get evaluated? referenced anywhere in the docs?

推荐答案

在调度程序的每次运行中都要评估DAG。

The DAGs are evaluated in every run of the scheduler.

本文描述了调度程序工作原理,以及在什么阶段提取DAG文件进行评估。

This article describes how the scheduler works and at what stage the DAG files are picked up for evaluation.

这篇关于什么时候评估气流损失定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆