Airflow似乎正在跳過我添加到/ usr/local/airflow/dags的dags。未在/ usr/local/airflow/dags中加載dag的氣流
當我運行
airflow list_dags
輸出顯示
[2017-08-06 17:03:47,220] {models.py:168} INFO - Filling up the DagBag from /usr/local/airflow/dags
-------------------------------------------------------------------
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
但是,這並不包括在/ usr /本地/通風/的DAG中的DAG
ls -la /usr/local/airflow/dags/
total 20
drwxr-xr-x 3 airflow airflow 4096 Aug 6 17:08 .
drwxr-xr-x 4 airflow airflow 4096 Aug 6 16:57 ..
-rw-r--r-- 1 airflow airflow 1645 Aug 6 17:03 custom_example_bash_operator.py
drwxr-xr-x 2 airflow airflow 4096 Aug 6 17:08 __pycache__
有需要滿足一些其他條件以確定氣流來識別DAG並加載它?
是的,第一個元素是DAG id,您可以看到變量列表[here](https://airflow.incubator.apache.org/ code.html#airflow.models.DAG) –