如何停止 运行 dag 使用 airflow rest api
How to stop running dag using airflow rest api
我有一个 运行 dag,我可以使用 REST API 停止它吗?
有一种方法可以删除 运行 dag:
https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/delete_dag_run。
但是没有 REST API 如何停止 运行 dag?
谢谢!
您可以使用 Set a state of task instances 将 运行 任务设置为 failed
请注意,这将从 运行 停止任务并将任务状态设置为失败,但它会如果您在任务上设置了一个,则不会调用 on_failure_callable
,也不会调用运算符的 on_kill
方法(如果有的话)。
如果您希望 DAG 不再安排任何任务,您可以将其设置为暂停 Update a DAG
我有一个 运行 dag,我可以使用 REST API 停止它吗?
有一种方法可以删除 运行 dag: https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/delete_dag_run。
但是没有 REST API 如何停止 运行 dag?
谢谢!
您可以使用 Set a state of task instances 将 运行 任务设置为 failed
请注意,这将从 运行 停止任务并将任务状态设置为失败,但它会如果您在任务上设置了一个,则不会调用 on_failure_callable
,也不会调用运算符的 on_kill
方法(如果有的话)。
如果您希望 DAG 不再安排任何任务,您可以将其设置为暂停 Update a DAG