IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2008, 3:59:25 PM (18 years ago)
Author:
eugene
Message:

merging changes from eam_branch_20080109: adding workdir/volume mangling and chip/hostname relationships

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/summit.copy.pro

    r15298 r16173  
    77# pztool -adddatastore -inst allskycam -telescope ps1 -uri  http://otis1.ifa.hawaii.edu/ds/allskycam/index.txt
    88
    9 $workdir    = /data/ipp010.0/
     9# the templates are used if we have a class_id/host relationship; if none is found, the default values are used
     10# XXX not sure how to handle the .N value if we need to use more than one
     11if ($NEBULOUS)
     12 $workdir_default  = neb://
     13 $workdir_template = neb://
     14 $volume_default  = ipp004-v0
     15 $volume_template = @HOST@-v0
     16else
     17 $workdir_default  = /data/ipp004.0/
     18 $workdir_template = /data/@HOST@.0/
     19end
    1020
    1121$VERBOSE = 1
     
    3444    periods      -poll     1
    3545    periods      -timeout  15
     46    npending     1
    3647
    3748    # success
     
    231242    periods      -poll     0.05
    232243    periods      -timeout  120
    233     host        anyhost
    234244
    235245    task.exec
     
    264274        substr $DATEOBS 8 2 DAY
    265275
     276        # we need to set the workdir based on 1) nebulous or not? 2) chip/host relationship
     277        # this function uses workdir_template, workdir_default, volume_template, volume_default,
     278        # it sets workdir and volume
     279        set.workdir.by.camera $CAMERA $CLASS_ID
     280
    266281        # figure out filename
     282        # XXXX this filename needs to use nebulous names
    267283        $FILENAME = $workdir/$CAMERA/$YEAR/$MONTH/$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
     284        $FILEROOT = $workdir/$CAMERA/$YEAR/$MONTH/$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID
    268285
    269286        book setword pzPendingImfile $pageName filename $FILENAME
     287
     288        set.host.by.camera $CAMERA $CLASS_ID
     289        host        anyhost
    270290
    271291        # store the pageName with this job
    272292        options $pageName
    273 
    274         if ($MD5SUM == 0)
    275             $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES
    276         else
    277             $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES --md5 $MD5SUM
     293        options $FILEROOT
     294
     295        $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES
     296        if ($MD5SUM)
     297            $run = $run --md5 $MD5SUM
     298        end
     299        if ($NEBULOUS && ("$volname" != "NULL"))
     300            $run = $run --volume $volume
    278301        end
    279302
     
    295318        book getword pzPendingImfile $options:0 filename -var FILENAME
    296319
     320        # we need to set the values of tess_id, dvodb, end_stage, workdir here
     321        # these are functions of (at least) EXP_TYPE and SURVEY_ID, both of which should come from the data store
     322
    297323        # update the database with the success
    298         $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME
     324        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $options:1
     325        # tess_id, dvodb, workdir, end_stage
    299326
    300327        # create the command line
Note: See TracChangeset for help on using the changeset viewer.