Skip to content

Commit dddcebc

Browse files
authored
Give each tmux pane in start-airflow a title to make it clear what is running (#46931)
1 parent 9877491 commit dddcebc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/in_container/bin/run_tmux

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ export TMUX_SESSION="Airflow"
4343
# Start New Session with our name
4444
tmux new-session -d -s "${TMUX_SESSION}"
4545

46+
tmux set -g pane-border-format "#{pane_index}: #{@airflow_component}"
47+
tmux set -g pane-border-status "top"
48+
4649
# Enable mouse interaction with tmux. This allows selecting between the panes
4750
# by clicking with the mouse and also allows scrolling back through terminal
4851
# output with the mouse wheel.
@@ -54,10 +57,12 @@ tmux send-keys -t 'Main' 'bash' C-m 'clear' C-m
5457

5558
tmux split-window -v
5659
tmux select-pane -t 1
60+
tmux set-option -p @airflow_component Scheduler
5761
tmux send-keys 'airflow scheduler' C-m
5862

5963
tmux split-window -h
6064
tmux select-pane -t 2
65+
tmux set-option -p @airflow_component FastAPI
6166

6267
if [[ ! ${USE_AIRFLOW_VERSION=} =~ ^2\..* ]]; then
6368
if [[ ${DEV_MODE=} == "true" ]]; then
@@ -69,6 +74,7 @@ fi
6974

7075
tmux split-window -h
7176
tmux select-pane -t 3
77+
tmux set-option -p @airflow_component Webserver
7278
if [[ ${DEV_MODE=} == "true" ]]; then
7379
tmux send-keys 'airflow webserver -d' C-m
7480
else
@@ -77,21 +83,25 @@ fi
7783

7884
tmux select-pane -t 0
7985
tmux split-window -h
86+
tmux set-option -p @airflow_component Triggerer
8087
tmux send-keys 'airflow triggerer' C-m
8188

8289
if [[ ${INTEGRATION_CELERY} == "true" ]]; then
8390
tmux select-pane -t 0
8491
tmux split-window -h
92+
tmux set-option -p @airflow_component "Celery Worker"
8593
tmux send-keys 'airflow celery worker' C-m
8694
fi
8795
if [[ ${INTEGRATION_CELERY} == "true" && ${CELERY_FLOWER} == "true" ]]; then
8896
tmux select-pane -t 3
8997
tmux split-window -h
98+
tmux set-option -p @airflow_component Flower
9099
tmux send-keys 'airflow celery flower' C-m
91100
fi
92101
if [[ ${AIRFLOW__CORE__EXECUTOR} == "airflow.providers.edge.executors.edge_executor.EdgeExecutor" ]]; then
93102
tmux select-pane -t 0
94103
tmux split-window -h
104+
tmux set-option -p @airflow_component EdgeExec
95105

96106
# Ensure we are not leaking any DB connection information to Edge Worker process
97107
tmux send-keys 'unset AIRFLOW__DATABASE__SQL_ALCHEMY_CONN' C-m
@@ -109,6 +119,7 @@ fi
109119
if [[ ${STANDALONE_DAG_PROCESSOR} == "true" ]]; then
110120
tmux select-pane -t 3
111121
tmux split-window -h
122+
tmux set-option -p @airflow_component "DAG Pocessor"
112123
tmux send-keys 'airflow dag-processor' C-m
113124
fi
114125

0 commit comments

Comments
 (0)