Reputation: 23
I have a running dag, Can I stop it using REST API ?
There is a method to delete a running dag: https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/delete_dag_run。
But There is not REST API how to stop a running dag?
Thanks!
Upvotes: 1
Views: 2841
Reputation: 15931
You can set the running tasks to failed
with Set a state of task instances note that this will stop the task from running and set the task status to failed but it will not invoke the on_failure_callable
if you set one on your tasks nor it will invoke the on_kill
method of the operator (if there is one).
If you want the DAG to not schedule any more tasks you can set it to Pause with Update a DAG
Upvotes: 1