Blame view

runRequest 593 Bytes
ea763814   Elena.Budnik   init
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# Prepare & Run Request

tgt=$1 # prefix
tgt_vi=$2
src_vi=$3
TaoStop=$4
SwStop=$5

. $(dirname $BASH_SOURCE)/env.sh

f5a5ef6f   Elena.Budnik   work
12
13
14
15
16
17
18
19
20
 case $src_vi in
	omni_hour_all)
		src=omni
	;; 
	ace_swepam_real)
		src=ace
	;;
 esac

ea763814   Elena.Budnik   init
21
 # delete results of previous calculations
f5a5ef6f   Elena.Budnik   work
22
 rm -rf $SW2NC/$tgt* $SW2DATA/$src/$tgt*
ea763814   Elena.Budnik   init
23
 
af920889   Elena.Budnik   ajust
24
 # delete previous requests 
f5a5ef6f   Elena.Budnik   work
25
 rm -f $REQ/*.xml 
ea763814   Elena.Budnik   init
26

f5a5ef6f   Elena.Budnik   work
27
28
29
30
 cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop  > log
 DDLogin $DDUSER $DDPWD >> log
  
	
ea763814   Elena.Budnik   init
31
32
33
 # run newly created Request
 for request in $REQ/$tgt*.xml
  do
f5a5ef6f   Elena.Budnik   work
34
	python run.py $tgt $src $request & echo $!
ea763814   Elena.Budnik   init
35
36
  done