How do I check if there are DAGs running in Airflow (before restarting Airflow)?

喜你入骨 提交于 2021-02-11 14:19:50

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!