Ignore:
Timestamp:
10/27/10 17:48:15 (14 years ago)
Author:
Daniela Dorner
Message:
lock in db instead of lockfile
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/datacenter/scripts/runcallisto_mc

    r9920 r10041  
    3737
    3838# get sequence #
    39 gettodo "1"
    40 sequence=${primaries[0]}
    41 cereskey=${primaries[1]}
    42 
    43 # lock sequ for cal
    44 lockfile=$lockpath/lock-$step-$sequence-$cereskey.txt
    45 checklock
     39numchanged=0
     40while (( 0 < 21 ))
     41do
     42   if ! [ $numchanged -eq 1 ]
     43   then
     44      if ! [ "$sequence" = "" ] && ! [ "$cereskey" = "" ]
     45      then
     46         printprocesslog "INFO $program for sequence $sequence cereskey $cereskey is already running => request new number "
     47      fi
     48      gettodo "1"
     49      sequence=${primaries[0]}
     50      cereskey=${primaries[1]}
     51      if [ "$sequence" = "" ] || [ "$cereskey" = "" ]
     52      then
     53         printprocesslog "INFO nothing to do for $program "
     54      fi
     55   else
     56      printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey"
     57      break
     58   fi
     59   setstatus "start"
     60done
    4661
    4762cd $mars
    4863
    4964# run calibration for sequence
    50 printprocesslog "INFO starting $program for sequence $sequence cereskey $cereskey"
    5165
    5266# define files and paths
     
    5771callistorc=$setuppath/$program/`printf %03d $cereskey`/callisto.rc
    5872inpath=$mcpath/ceres/`printf %03d $cereskey`/`printf %08d $sequence | cut -c 1-4`/`printf %08d $sequence | cut -c 5-8`
    59 
    60 setstatus "start"
    6173
    6274command="./callisto -b -q -v4 -f --out=$outpath --ind=$inpath --log=$log.log --html=$log.html --config=$callistorc $sequfile"
Note: See TracChangeset for help on using the changeset viewer.