IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 22, 2008, 9:04:15 AM (18 years ago)
Author:
eugene
Message:

update cleanup code for current interface with chiptool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/chip.pro

    r18142 r18273  
    88# test for required global variables
    99check.globals
    10 
    11 $LOGSUBDIR = $LOGDIR/chip
    12 exec mkdir -p $LOGSUBDIR
    1310
    1411book init chipPendingImfile
     
    7067
    7168  stdout NULL
    72   stderr $LOGSUBDIR/chip.imfile.log
     69  stderr $LOGDIR/chip.imfile.log
    7370
    7471  task.exec
     
    151148    sprintf outroot "%s/%s/%s.ch.%s" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID
    152149
    153     ## generate output log based on filerule (convert the URI to a PATH)
    154     $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
    155     if ("$logfile" == "")
    156       echo "WARNING: logfile not defined in chip.pro:152"
    157       break
    158     end
    159 
    160     stdout $logfile
    161     stderr $logfile
    162     dirname $logfile -var outpath
    163     mkdir $outpath
     150    stdout $logdir/chip.imfile.log
     151    stderr $logdir/chip.imfile.log
    164152
    165153    $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA --outroot $outroot
     
    207195
    208196  stdout NULL
    209   stderr $LOGSUBDIR/chip.cleanup.log
     197  stderr $LOGDIR/chip.cleanup.log
    210198
    211199  task.exec
    212200    if ($DB:n == 0)
    213201      option DEFAULT
    214       command chiptool -pendingcleanup -limit 20
     202      command chiptool -pendingcleanuprun -limit 20
    215203    else
    216204      # save the DB name for the exit tasks
    217205      option $DB:$chip_cleanup_DB
    218       command chiptool -pendingcleanup -limit 20 -dbname $DB:$chip_cleanup_DB
     206      command chiptool -pendingcleanuprun -limit 20 -dbname $DB:$chip_cleanup_DB
    219207      $chip_cleanup_DB ++
    220208      if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
     
    263251    book setword chipPendingCleanup $pageName pantaskState RUN
    264252    book getword chipPendingCleanup $pageName camera -var CAMERA
    265     book getword chipPendingCleanup $pageName class_id -var CLASS_ID
    266253    book getword chipPendingCleanup $pageName cleanup_mode -var CLEANUP_MODE
    267     book getword chipPendingCleanup $pageName path_base -var PATH_BASE
     254    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
    268255    book getword chipPendingCleanup $pageName dbname -var DBNAME
    269256
     
    271258    set.host.for.camera $CAMERA $CLASS_ID
    272259
    273     ## generate output log based on filerule (convert the URI to a PATH)
    274     $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $PATH_BASE`
    275     if ("$logfile" == "")
    276       echo "WARNING: logfile not defined in chip.pro:152"
    277       break
    278     end
    279 
    280     stdout $logfile
    281     stderr $logfile
    282     dirname $logfile -var outpath
    283     mkdir $outpath
     260    stdout $LOGDIR/chip.cleanup.log
     261    stderr $LOGDIR/chip.cleanup.log
    284262
    285263    # XXX is everything listed here needed?
    286     $run = ipp_cleanup.pl --stage chip --camera $CAMERA --class_id $CLASS_ID --mode $CLEANUP_MODE --path_base $PATH_BASE
     264    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
    287265    add_standard_args run
    288266
Note: See TracChangeset for help on using the changeset viewer.