Ignore:
Timestamp:
08/05/08 12:31:49 (16 years ago)
Author:
snruegam
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/zipscript

    r9049 r9091  
    3232# to give the possibility to run several zipscripts at the same time,
    3333# $1 is added
    34 program=zipscript$1
     34program=zipscript2
    3535
    3636set -C
     
    5757   echo "processing file $file..." >> $scriptlog 2>&1
    5858   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
    6072   echo " sending query: $query" >> $scriptlog 2>&1
    6173   if ! seq=`sendquery`
    6274   then
    63       echo "querying seq for run $runno from the db did not work -> continue" >> $scriptlog 2>&1
    64       printprocesslog "WARN query $seq for run $runno from 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"
    6577      continue
    6678   fi
    6779   if [ "$seq" == "" ]
    6880   then
    69       echo "no seq found for run $runno -> locking only run..." >> $scriptlog 2>&1
     81      echo "no seq found for run M_${telno}${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&1
    7082      seq=$runno
    7183   fi
    7284   echo "locking sequence $seq..."  >> $scriptlog 2>&1
    73    lockfile=$lockpath/calzip$seq.txt
     85   lockfile=$lockpath/calzip${seq}-${telno}.txt
    7486   checklock continue >> $scriptlog 2>&1
    7587   query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq"
Note: See TracChangeset for help on using the changeset viewer.