Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前有一个PythonSensor等待 ftp 服务器上的文件。是否可以让此传感器在超时时触发任务?我正在尝试创建以下 dag:
PythonSensor
气流传感器示意图
我已经看过了,BranchPythonOperator但如果第一次失败,我似乎不再获得重新安排任务的好处。
BranchPythonOperator
你试过trigger_rule="all_failed"在你的任务中使用吗?
trigger_rule="all_failed"
all_failed:所有上游任务都处于失败或upstream_failed状态
请参阅http://airflow.apache.org/docs/apache-airflow/stable/concepts/dags.html?highlight=all_failed#trigger-rules
这里有一个例子http://airflow.apache.org/docs/apache-airflow/stable/faq.html?highlight=all_failed#how-to-trigger-tasks-based-on-another-task-s-failure