问题
I need to restart Airflow. I want to make sure I do it when it's idle, so I that I don't interrupt a job by restarting the worker component of Airflow.
How do I see what DAGs are running?
I don't see anything in the UI that would list currently running DAGs.
I don't see any command in the airflow
CLI to list currently running DAGs.
I found airflow shell
that lets me connect to the DB, but I don't know enough about Airflow internals to know where to look to see what's running.
回答1:
You can also query the database to get all running tasks at once:
select * from task_instance where state='running'
回答2:
I found it... it's in the UI, on the DAGs page, it's the second circle under "Recent Tasks":
来源:https://stackoverflow.com/questions/64434951/how-do-i-check-if-there-are-dags-running-in-airflow-before-restarting-airflow