I know there is a way to delete a DAG. But is it possible to delete a DAG run with a specific run_id? Something like:
airflow delete_dag_run <dag_id> <run_id>
Click on the "select all" checkbox at the top of the list to select all of the queued tasks. Now, in the "Actions" menu, select "Clear" and apply it to all of the queued tasks. Confirm your choice to Clear the queued tasks. Airflow should immediately prepare to run the queued tasks.
To clean up scheduler log files I do delete them manually two times in a week to avoid the risk of logs deleted which needs to be required for some reasons. I clean the logs files by [sudo rm -rd airflow/logs/] command.
If you want to re-run a task in Airflow, the best way to do so is to press Clear or Delete (language depends on the Airflow version you're running), not Run . Hitting this will clear the state of your failed task and allow the scheduler to pick it back up and re-run it.
To delete a DAG Run from the Airflow UI:
Browse > "DAG Runs"
."With selected" > Delete
.You can also delete the "DAG Runs" from airflow database:
DELETE FROM dag_run
WHERE dag_id='my_dag_id' AND
state='STATE_I_WANT_TO_DELETE'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With