Changeset 18774
- Timestamp:
- 02/21/17 20:16:54 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Sourcefile.sh
r18771 r18774 36 36 datetime=`date +%F-%H-%M-%S` 37 37 38 if [ "$transferdelay" = "" ] 39 then 40 # setup where immediate report of problem is needed, i.e. mainly LP 41 checknight=`date +%Y%m%d --date="-19HOUR"` 42 else 43 # any setup where transfer might cause a delay in arrival of files 44 checknight=`date +%Y%m%d --date="-${transferdelay}day"` 45 fi 38 46 39 47 # function to make sure that a directory is made … … 197 205 error=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'` 198 206 # here possible reaction to mysql error 207 if [ $error -eq 1213 ] 208 then 209 printprocesslog "WARN Deadlock found. Should resend query." 210 printprocesslog "DEBUG sendquery QUERY: [2nd try] "$query 211 val=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query " 2>&1` 212 checkmysql2=`echo $?` 213 if [ $checkmysql2 -gt 0 ] 214 then 215 printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us" (program: $program, function sendquery) [2nd try]" 216 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val" [2nd try]" 217 error2=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'` 218 val= 219 finish 220 else 221 if [ "$val" = "NULL" ] 222 then 223 val= 224 fi 225 echo $val 226 return 0 227 fi 228 fi 199 229 val= 200 230 finish … … 577 607 finish 578 608 fi 579 if [ "$transferdelay" = "" ]580 then581 # setup where immediate report of problem is needed, i.e. mainly LP582 checknight=`date +%Y%m%d --date="-19HOUR"`583 else584 # any setup where transfer might cause a delay in arrival of files585 checknight=`date +%Y%m%d --date="-${transferdelay}day"`586 fi587 609 588 610 printprocesslog "INFO checking availability of "$1
Note:
See TracChangeset
for help on using the changeset viewer.