Skip to content

Commit

Permalink
fix(risedev): don't kill tmux session unnecessarily
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan committed Apr 27, 2024
1 parent 4ba2e66 commit 36c1a5a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -720,23 +720,20 @@ if ! ${TMUX} ls &>/dev/null ; then
exit 0
fi
# Kill other components
# Kill other components with Ctrl+C/Ctrl+D
${TMUX} list-windows -F "#{window_name} #{pane_id}" \
| grep -v 'kafka' \
| grep -v 'zookeeper' \
| grep --invert-match --extended-regexp '(kafka|zookeeper)' \
| awk '{ print $2 }' \
| xargs -I {} ${TMUX} send-keys -t {} C-c C-d
# Kill kafka cleanly. Ctrl+C will lose data.
if [[ -n $(${TMUX} list-windows | grep kafka) ]];
then
echo "kill kafka"
kill_kafka || true
echo "kill zookeeper"
kill_zookeeper || true
# Kill their ${TMUX} sessions
${TMUX} list-windows -t risedev -F "#{pane_id}" | xargs -I {} ${TMUX} send-keys -t {} C-c C-d
fi
${TMUX} kill-server
Expand Down

0 comments on commit 36c1a5a

Please sign in to comment.