File: jobHandlerScript

package info (click to toggle)
doris 5.0.3~beta%2Bdfsg-16
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 6,932 kB
  • sloc: cpp: 43,560; python: 8,213; csh: 3,636; sh: 2,527; ansic: 649; makefile: 346; xml: 208
file content (43 lines) | stat: -rwxr-xr-x 1,328 bytes parent folder | download | duplicates (4)
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
#!/bin/bash


echo ${3} >> ${1}/${2}".started"
if [[ "${4}" == "True" ]]; then
      echo "DORIS PARALLEL:"
      export PYTHONPATH="${5}:$PYTHONPATH"
      echo "PYTHONPATH:"
      echo $PYTHONPATH
      echo "PATH:"
      echo $PATH
      echo ${3}" "${6}" "${7}" "${8}" "${9}" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}" "${17}" "${18}" started"
      date +%T
      pwd
      echo >> "./job.started"
fi
return_value=1
index=0
while [[ $return_value -ne 0 && index -le 5 ]]; do
    echo "INDEX = "$index
    if [[ $index -gt 0 ]]; then
        echo "DORIS PARALLEL Execution FAILED, retry nr "$index
        echo "DORIS PARALLEL "${3}" "${6}" "${7}" "${8}" "${9}" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}" "${17}" "${18}" RESTARTED"
    fi
    ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} 2>&1 | tee job_$index_${2}.log # start job
    return_value=$?
    if [ "${3}" == "True" ]; then
        echo "DORIS PARALLEL return value is:"
        echo $return_value
    fi
    ((index++))
done
echo ${3} >> ${1}/${2}".finished"
if [ "${4}" == "True" ]; then
      echo "DORIS PARALLEL:"
      echo ${3}" "${6}" "${7}" "${8}" "${9}" "${10}" "${11}" "${12}" "${13}" "${14}" "${15}" "${16}" "${17}" "${18}" finished"
      date +%T
      pwd
      echo >> "./job.finished"
fi