Changeset 9091 for trunk/MagicSoft/Mars/datacenter/scripts/zipscript
- Timestamp:
- 08/05/08 12:31:49 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/zipscript
r9049 r9091 32 32 # to give the possibility to run several zipscripts at the same time, 33 33 # $1 is added 34 program=zipscript $134 program=zipscript2 35 35 36 36 set -C … … 57 57 echo "processing file $file..." >> $scriptlog 2>&1 58 58 runno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\2/'` 59 query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno 59 fileno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\3/'` 60 telno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\1/' | cut -c2` 61 # old runs have a fileno of 0 62 if [ "$fileno" == "" ] 63 then 64 fileno=0 65 fi 66 # old runs have a telno of 1 67 if [ "$telno" == "" ] 68 then 69 telno=1 70 fi 71 query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno" AND fFileNumber="$fileno" AND fTelescopeNumber="$telno 60 72 echo " sending query: $query" >> $scriptlog 2>&1 61 73 if ! seq=`sendquery` 62 74 then 63 echo "querying seq for run $runnofrom the db did not work -> continue" >> $scriptlog 2>&164 printprocesslog "WARN query $seq for run $runnofrom the db did not work"75 echo "querying seq for run M_${telno}${runno}.${fileno} from the db did not work -> continue" >> $scriptlog 2>&1 76 printprocesslog "WARN query $seq for run M_${telno}${runno}.${fileno} from the db did not work" 65 77 continue 66 78 fi 67 79 if [ "$seq" == "" ] 68 80 then 69 echo "no seq found for run $runno-> locking only run..." >> $scriptlog 2>&181 echo "no seq found for run M_${telno}${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&1 70 82 seq=$runno 71 83 fi 72 84 echo "locking sequence $seq..." >> $scriptlog 2>&1 73 lockfile=$lockpath/calzip$ seq.txt85 lockfile=$lockpath/calzip${seq}-${telno}.txt 74 86 checklock continue >> $scriptlog 2>&1 75 87 query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq"
Note:
See TracChangeset
for help on using the changeset viewer.