使用 CeleryExecutor 时 DAG 在 Airflow 中的位置

Location of DAG's in Airflow when using CeleryExecutor

我是 Apache Airflow 的新手,在阅读了文档之后,我了解了 Airflow 中可用的执行器类型及其基本工作模型。

我的问题是关于 CeleryExecutor

使用此执行程序时,我无法找到 DAG 所在的位置。

我的 Airflow 配置如下:

airflow_home = /home/airflow
dags_folder = /home/airflow/dags

当我使用 运行 列出 DAG 的命令时,我得到以下输出

-------------------------------------------------------------------
DAGS
-------------------------------------------------------------------
example_bash_operator
example_branch_dop_operator_v3
example_branch_operator
example_http_operator
example_passing_params_via_test_command
example_python_operator
example_short_circuit_operator
example_skip_dag
example_subdag_operator
example_subdag_operator.section-1
example_subdag_operator.section-2
example_trigger_controller_dag
example_trigger_target_dag
example_xcom
latest_only
latest_only_with_trigger
test_utils
tutorial

尽管 dags 文件夹不存在。

在我的集群中,我是运行ning

1 WebServer Node
1 Scheduler + Flower Node
1 MySQL Server Node
2 Celery Worker Nodes

如果有人能解释这个概念,那将有很大帮助。 更具体地说,我想了解 dags 文件夹将驻留在哪个节点上。

提前致谢。

您正在列出 Airflow 附带的示例 DAG。查看配置文件 airflow.cfg.

中的设置 load_example

How to remove default example dags in airflow

对于您的集群,您需要在集群的不同机器上同步 DAG 和配置。查看 https://airflow.apache.org/docs/stable/best-practices.html?highlight=cluster#multi-node-cluster 和 Celery 部分