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/runcorsika

    r10006 r10041  
    144144
    145145
    146 # get sequence #
    147 gettodo "1"
    148 run=${primaries[0]}
    149 file=${primaries[1]}
    150 
    151 # lock sequ
    152 lockfile=$lockpath/lock-$step-$run.$file.txt
    153 checklock
    154 
    155 printprocesslog "INFO starting $program for run $run and file $file"
    156 
    157 setstatus "start"
    158 
     146# get run # and file #
     147numchanged=0
     148while (( 0 < 21 ))
     149do
     150   if ! [ $numchanged -eq 1 ]
     151   then
     152      if ! [ "$run" = "" ] && ! [ "$file" = "" ]
     153      then
     154         printprocesslog "INFO $program for run $run and file $file is already running => request new number "
     155      fi
     156      gettodo "1"
     157      run=${primaries[0]}
     158      file=${primaries[1]}
     159      if [ "$run" = "" ] || [ "$file" = "" ]
     160      then
     161         printprocesslog "INFO nothing to do for $program "
     162      fi
     163   else
     164      printprocesslog "INFO starting $program for run $run and file $file"
     165      break
     166   fi
     167   setstatus "start"
     168done
     169
     170# running corsika
    159171printprocesslog "INFO run $program for run $run  and file $file"
    160172printprocesslog "INFO create input card for run $run  and file $file"
Note: See TracChangeset for help on using the changeset viewer.