无需手动终止所有调度程序PID即可终止气流调度程序?

时间:2019-12-24 21:16:04

标签: airflow

使用LocalExecutor运行气流(v1.10.5),并发现要重新启动或终止调度程序守护程序(通过airflow scheduler -D和其他SO post启动)时,需要< kill -9 ...手动执行每个调度程序进程,例如...

[airflow@airflowetl airflow]$ ps -aux | grep scheduler
airflow    9137  2.0  0.1 723196 72964 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9141  0.5  0.1 1503344 72724 ?       Sl   11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9149  0.0  0.1 722940 71408 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9150  0.0  0.1 722940 71408 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9154  0.0  0.1 722940 71412 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9157  0.0  0.1 722940 71408 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9162  0.0  0.1 722940 71412 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9166  0.0  0.1 722940 71416 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9171  0.0  0.1 722940 71412 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9175  0.0  0.1 722940 71412 ?        S    11:06   0:00 /usr/bin/python3 /home/airflow/.local/bin/airflow scheduler -D
airflow    9181  0.7  0.1 723344 72808 ?        S    11:06   0:00 airflow scheduler -- DagFileProcessorManager

[airflow@airflowetl airflow]$ kill -9 $(cat $AIRFLOW_HOME/airflow-scheduler.pid) 9181 9175 ...

有没有更简单的方法来杀死调度程序(和Web服务器)守护程序?就是不必手动杀死所有调度程序守护程序实例(不仅是airflow-scheduler.pid文件中的PID和名为PID的PID)。

0 个答案:

没有答案