#!/usr/bin/env bash
# Start both queues in their own tmux session 'decoder_lodo' (window 'cpu' = linear, window 'gpu' = DNN).
# Attach with:  tmux attach -t decoder_lodo      (Ctrl-b n / Ctrl-b p to switch windows, Ctrl-b d to detach)
cd "$(dirname "$0")/.."
S=decoder_lodo
if tmux has-session -t $S 2>/dev/null; then echo "tmux session $S already exists"; exit 1; fi
tmux new-session -d -s $S -n cpu "bash runners/run_queue.sh cpu; echo 'cpu queue finished'; exec bash"
tmux new-window  -t $S -n gpu "bash runners/run_queue.sh gpu; echo 'gpu queue finished'; exec bash"
tmux new-window  -t $S -n ssm "bash runners/run_queue.sh ssm; echo 'ssm queue finished'; exec bash"
tmux new-window  -t $S -n status "watch -n 60 bash status.sh"
echo "started tmux session $S"
