File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,10 @@ START_EPOCH=$(date -d "$START_TIME" +%s 2>/dev/null || date -u +%s)
129129 echo $BASHPID > " $CHILD_PID_FILE "
130130
131131 while true ; do
132- # tmuxセッション確認(任意のセッション名に対応)
133- if ! tmux list-sessions 2> /dev/null | grep -q . ; then
134- # セッションが1つも存在しない場合のみ終了
132+ # プロジェクト名を含むセッションの存在確認(より安全な方法)
133+ if ! tmux list-panes -t Team1_PM 2> /dev/null | grep -q . && \
134+ ! tmux list-panes -t Team1_Workers1 2> /dev/null | grep -q . ; then
135+ # 該当プロジェクトのセッションが存在しない場合のみ終了
135136 exit 0
136137 fi
137138
@@ -181,9 +182,10 @@ LAST_MILESTONE=0
181182MILESTONE_CHECK_INTERVAL=$(( MILESTONE_INTERVAL_MIN * 60 )) # 分を秒に変換
182183
183184while true ; do
184- # tmuxセッション確認(任意のセッション名に対応)
185- if ! tmux list-sessions 2> /dev/null | grep -q . ; then
186- echo " [$( date -u +" %Y-%m-%dT%H:%M:%SZ" ) ] No tmux sessions found, exiting" >> " $LOG_FILE "
185+ # プロジェクト名を含むセッションの存在確認(より安全な方法)
186+ if ! tmux list-panes -t Team1_PM 2> /dev/null | grep -q . && \
187+ ! tmux list-panes -t Team1_Workers1 2> /dev/null | grep -q . ; then
188+ echo " [$( date -u +" %Y-%m-%dT%H:%M:%SZ" ) ] No project tmux sessions found, exiting" >> " $LOG_FILE "
187189 cleanup_and_exit
188190 fi
189191
You can’t perform that action at this time.
0 commit comments