1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| CheckStatus(){
JobStatus="JobStarting..."
until [ $JobStatus = "Succeeded" ] || [ $JobStatus = "Failed" ]
do
echo "Job Current Status is $JobStatus"
sleep 5
curl -k -X POST -H "$session" -H 'Cache-Control: no-cache' -H
'Content-Type: application/json' $RequestURL/trigger -d "{\"args\": []}"|
python -m json.tool >$outputPath/tempJobstatus.txt
sub2=`cat $outputPath/tempJobstatus.txt |sed 's/\"//g' | grep result`
JobStatus=$(echo $sub2| cut -f 4 -d :| cut -f 1 -d ,)
done
report="Job Final Status is $JobStatus"
echo $report
echo $report >> $outputPath/Report.txt
}
|