IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34775


Ignore:
Timestamp:
Dec 7, 2012, 11:56:15 AM (13 years ago)
Author:
bills
Message:

For chip, warp, and diff stage cleanup, add a mode where all components
are cleaned regardless of their data state. This can be used to go
and clean up files added to the list of files to clean (chip and warp cmfs)
for example and to find files that weren't previously cleaned up.
Controlled with set.check.all.components and clear.check.all.components.

Log output to nebulous logfile rather than a file in pantasks_logs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/science.cleanup.pro

    r34203 r34775  
    1313
    1414check.globals
     15
     16# if set tell cleanup script to check for files from all components regardless of the data_state
     17$CHECK_ALL_COMPONENTS = 0
     18macro set.check.all.components
     19    $CHECK_ALL_COMPONENTS = 1
     20end
     21macro clear.check.all.components
     22    $CHECK_ALL_COMPONENTS = 0
     23end
     24macro get.check.all.components
     25    echo CHECK_ALL_COMPONENTS = $CHECK_ALL_COMPONENTS
     26end
     27
    1528
    1629## chip.cleanup.pro : -*- sh -*-
     
    130143    book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
    131144    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
     145    book getword chipPendingCleanup $pageName exp_tag -var EXP_TAG
     146    book getword chipPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    132147    book getword chipPendingCleanup $pageName dbname -var DBNAME
    133148
    134     # specify choice of local or remote host based on camera and chip (class_id)
     149    # specify choice of local or remote host based on camera and chip (in this case FPA)
    135150    set.host.for.camera $CAMERA FPA
     151
     152    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     153
     154    sprintf LOGFILE "%s/%s/%s.ch.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID
    136155
    137156    stdout $LOGDIR/chip.cleanup.log
    138157    stderr $LOGDIR/chip.cleanup.log
    139158
    140     # XXX is everything listed here needed?
    141     $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
     159    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     160    if ($CHECK_ALL_COMPONENTS)
     161        $run = $run --check-all
     162    end
    142163    add_standard_args run
    143164
     
    282303    book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
    283304    book getword camPendingCleanup $pageName cam_id -var CAM_ID
     305    book getword camPendingCleanup $pageName exp_tag -var EXP_TAG
     306    book getword camPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    284307    book getword camPendingCleanup $pageName dbname -var DBNAME
    285308
     
    287310    set.host.for.camera $CAMERA FPA
    288311
     312    # set the WORKDIR variable
     313    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
     314
     315    ## generate LOGFILE specific to this exposure (& cam_id)
     316    sprintf LOGFILE "%s/%s/%s.cm.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $CAM_ID
     317
    289318    stdout $LOGDIR/camera.cleanup.log
    290319    stderr $LOGDIR/camera.cleanup.log
    291320
    292     # XXX is everything listed here needed?
    293     $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
     321    $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
    294322    add_standard_args run
    295323
     
    591619    book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
    592620    book getword warpPendingCleanup $pageName warp_id -var WARP_ID
     621    book getword warpPendingCleanup $pageName exp_tag -var EXP_TAG
     622    book getword warpPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
    593623    book getword warpPendingCleanup $pageName dbname -var DBNAME
    594624
    595625    # specify choice of local or remote host based on camera and warp (class_id)
    596626    set.host.for.camera $CAMERA FPA
     627    set.workdir.by.camera $CAMERA $WARP_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     628
     629    sprintf LOGFILE "%s/%s/%s.wrp.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $WARP_ID
    597630
    598631    stdout $LOGDIR/warp.cleanup.log
     
    600633
    601634    # XXX is everything listed here needed?
    602     $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
     635    $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     636    if ($CHECK_ALL_COMPONENTS)
     637        $run = $run --check-all
     638    end
    603639    add_standard_args run
    604640
     
    748784    book getword diffCleanup $pageName state -var CLEANUP_MODE
    749785    book getword diffCleanup $pageName diff_id -var DIFF_ID
     786    book getword diffCleanup $pageName tess_id -var TESS_ID
     787    book getword diffCleanup $pageName workdir -var WORKDIR_TEMPLATE
    750788    book getword diffCleanup $pageName dbname -var DBNAME
    751789
    752790    # specify choice of local or remote host based on camera and diff (class_id)
    753791    set.host.for.camera $CAMERA FPA
     792    set.workdir.by.camera $CAMERA $DIFF_ID $WORKDIR_TEMPLATE $default_host WORKDIR
     793    sprintf LOGFILE "%s/%s/%s.dif.%s.cleanup.log" $WORKDIR $TESS_ID $TESS_ID $DIFF_ID
     794
    754795
    755796    stdout $LOGDIR/diff.cleanup.log
     
    757798
    758799    # XXX is everything listed here needed?
    759     $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
     800    $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $LOGFILE
     801    if ($CHECK_ALL_COMPONENTS)
     802        $run = $run --check-all
     803    end
    760804    add_standard_args run
    761805
Note: See TracChangeset for help on using the changeset viewer.