-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow_active.csh
More file actions
executable file
·64 lines (53 loc) · 1.24 KB
/
show_active.csh
File metadata and controls
executable file
·64 lines (53 loc) · 1.24 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#! /bin/csh -f
# monitor program
if ($#argv >= 1) then
set LIST = "*"$1"*"
else
set LIST = "*"
endif
# echo "$LIST"
if ($?WORKFLOW_ROOT) then
set WFDIR = $WORKFLOW_DATA
set WFCODE = $WORKFLOW_ROOT
else
echo Need WORKFLOW_ROOT variable to be set.
exit 1
endif
set nonomatch
cd $WFDIR
while (-e GATEKEEPERBUSY)
echo -n '.'
sleep 1
end
clear
echo " "
set nowtxt = `date -u +%Y.%m.%d_%H:%M:%S`"_UTC"
echo -n "TIME = $nowtxt, LAST_NEWICKET = "
cat LAST_NEWTICKET
cd $WFDIR/gates
foreach gate ( $LIST )
cd $WFDIR/gates/$gate
set gatestatus = `cat gatestatus`
if ($gatestatus == "HOLD") then
cd ..
continue
endif
cd active_tickets
set ticketlist = `/bin/ls`
set ntickets = $#ticketlist
if ($ntickets) then
echo " "
echo -n "GATE $gate" " for "
cat ../product
foreach ticket ($ticketlist)
set STATUS = `grep STATUS $ticket`
set WANTLOW = `grep WANTLOW $ticket`
set WANTHIGH = `grep WANTHIGH $ticket`
set ACTION = `grep ACTION $ticket`
set TASKID = `grep TASKID $ticket`
echo " $ticket"": $STATUS, $WANTLOW, $WANTHIGH, $ACTION, $TASKID"
end # active
endif
cd ..
end
echo " "