Changeset 12985 for trunk/DataCheck
- Timestamp:
- 03/01/12 15:02:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/CheckRawData.sh
r12980 r12985 23 23 # setup to use ftools 24 24 source $HEADAS/headas-init.sh 25 26 pwfile=`dirname $0`/.pw27 password=`cat $pwfile 2>/dev/null`28 if [ "$password" == "" ]29 then30 echo "please insert password in $pwfile"31 printprocesslog "ERROR password for DB access in $pwfile missing"32 finish33 fi34 25 35 26 # check if software is available … … 91 82 origfile=`echo $rawfile | sed -e 's/loc_data/daq/'` 92 83 93 # check if raw file was changed in the last 30 minutes94 isnew=`find $file -cmin -30`95 if [ "$isnew" != "" ]96 then97 printprocesslog "INFO "$file" is not older than 30 min. -> continue"98 continue99 fi100 101 84 # check if it is drs file 102 is new=`ls $file | grep drs`103 if [ "$is new" != "" ]85 isdrs=`ls $file | grep drs` 86 if [ "$isdrs" != "" ] 104 87 then 105 88 printprocesslog "INFO "$file" is a drs file. -> continue" … … 111 94 if [ -e $origfile ] 112 95 then 96 # check if raw file was changed in the last 30 minutes 97 isnew=`find $origfile -cmin -30` 98 if [ "$isnew" != "" ] 99 then 100 printprocesslog "WARN "$origfile" is not older than 30 min. -> continue" 101 continue 102 fi 103 113 104 # get time of last modification as seconds since Epoch for both files 114 105 timeorig=`stat -c %Y $origfile` … … 330 321 if [ "$result3" == "" ] 331 322 then 323 query="INSERT RawFileAvailISDC SET fNight="$runnumber", fRunID="$filenumberfromname 324 sendquery >/dev/null 332 325 query="INSERT" 333 326 querymid=" fNight="$runnumber", fRunID="$filenumberfromname", " … … 409 402 query=$query", fFitsFileErrors="$numfitserrors 410 403 query=$query" "$querystop 411 printprocesslog "INFO insert/update entry in DB. QUERY: "$query412 404 # send query to DB 413 405 sendquery >/dev/null 414 #if ! /usr/bin/mysql -u operator --host=fact01.fact.local --password=$password FactData -e "$query4"415 #then416 # printprocesslog "ERROR insert/update of "$numfromfile" to mysql failed."417 # finish418 #fi419 406 done 420 407 done
Note:
See TracChangeset
for help on using the changeset viewer.