-
Notifications
You must be signed in to change notification settings - Fork 12
/
predator.tmux
executable file
·29 lines (24 loc) · 1.02 KB
/
predator.tmux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
SESSION="PREDATOR"
POSTGRES_USER="nims"
POSTGRES_PW="nims"
POSTGRES_HOST="cnifs.stanford.edu"
POSTGRES_PORT="5432"
POSTGRES_DB="nims"
POSTGRES="postgresql:https://${POSTGRES_USER}:${POSTGRES_PW}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
UNSORTABLE_PATH="/scratch/cni/unsortable" # where to place unsortable files
STAGE_PATH="/scratch/cni/upload" # where uploads are placed, where sorter looks for new files
NIMS_PATH="/cnifs/nims" # base path where files get sorted
PHYSIO_PATH="/cnifs/nims/physio" # where physio files are unpacked into
# create
cd ~/nims
tmux new-session -s "$SESSION" -n bash -d
# mux processor
tmux new-window -t "$SESSION:1" -n "mux_proc"
tmux send-keys -t "$SESSION:1" \
"source ~/tg2env/bin/activate" C-m
tmux send-keys -t "$SESSION:1" \
"nimsproc/processor.py -j1 -k32 -t /scratch -e \"Epoch.psd.contains(u'mux')\" ${POSTGRES} ${NIMS_PATH} ${PHYSIO_PATH}" C-m
# attach to session
tmux select-window -t "$SESSION:0"
tmux attach-session -t "$SESSION"