IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15063


Ignore:
Timestamp:
Sep 27, 2007, 4:29:43 PM (19 years ago)
Author:
jhoblitt
Message:

tweaked up to work with camera DS

File:
1 edited

Legend:

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

    r14681 r15063  
    22
    33#$uri        = http://otis/ds/skyprobe/
    4 $uri        = http://otis4.ifa.hawaii.edu/ds/allskycam/
    5 $camera     = allskycam
    6 $telescope  = zl
    7 $workdir    = /home/moanui/jhoblitt/workdir
     4#$uri        = http://otis4.ifa.hawaii.edu/ds/allskycam/
     5#$camera     = allskycam
     6#$telescope  = zl
     7#$workdir    = /data/ipp004.0/allskycam
     8$uri        = http://conductor/ds/gpc1/index.txt
     9$camera     = gpc1
     10$telescope  = ps1
     11$workdir    = /data/ipp006.0/gpc1
     12
     13$VERBOSE = 1
    814
    915if ($?network == 0)
     
    2531
    2632  # timeout shorter than exec so jobs do not build up
    27   periods      -exec     30
    28   periods      -poll     10
    29   periods      -timeout  30
     33  periods      -exec     15
     34  periods      -poll     1
     35  periods      -timeout  15
    3036
    3137  task.exit     0
     
    4248# build a book of exps/filesetids that need to be queried
    4349task pztool.pendingexp
    44     command      pztool -pendingexp
     50    command      pztool -pendingexp -limit 25
    4551    host         local
    4652
    4753    # timeout shorter than exec so jobs do not build up
    48     periods      -exec     30
    49     periods      -poll     10
    50     periods      -timeout  30
     54    periods      -exec     15
     55    periods      -poll     1
     56    periods      -timeout  15
    5157
    5258    # success
     
    7379task pzgetimfile
    7480    periods      -exec     1
    75     periods      -poll     5
     81    periods      -poll     1
    7682    periods      -timeout  15
     83    host        local
     84    npending    5
    7785
    7886    task.exec
     
    105113        options $pageName
    106114
    107         $run = pzgetimfiles -uri $URI -filesetid $EXP_NAME -inst $CAMERA -telescope $TELESCOPE
     115        $batman = $EXP_NAME
     116        $run = pzgetimfiles -uri $URI -filesetid $batman -inst $CAMERA -telescope $TELESCOPE
    108117
    109118        # create the command line
     
    121130    task.exit default
    122131        showcommand failure
    123         book setword pzPendingExp $options:0 pantaskState $JOB_STATUS
     132        process_exit pzPendingExp $options:0 $JOB_STATUS
    124133    end
    125134
     
    133142# build a book of imfiles/files that need to be downloaded
    134143task pztool.pendingimfile
    135     command      pztool -pendingimfile
     144    command      pztool -pendingimfile -limit 25
    136145    host         local
    137146
    138147    # timeout shorter than exec so jobs do not build up
    139     periods      -exec     30
    140     periods      -poll     10
    141     periods      -timeout  30
     148    periods      -exec     5
     149    periods      -poll     1
     150    periods      -timeout  15
    142151
    143152    # success
    144153    task.exit    0
    145154        # convert 'stdout' to book format
    146 #       ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
    147         ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword pantaskState INIT
     155#       ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
     156
     157#        echo "pendingimfile "
     158#        queuesize stdout
     159
     160        ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword pantaskState INIT
     161
     162#        echo "pzPendingImfile N "
     163#        book npages pzPendingImfile
    148164
    149165        # delete existing entries in the appropriate pantaskStates
     
    163179task dsget
    164180    periods      -exec     5
    165     periods      -poll     5
     181    periods      -poll     1
    166182    periods      -timeout  30
     183    host        anyhost
    167184
    168185    task.exec
     
    189206        book getword pzPendingImfile $pageName bytes -var BYTES
    190207        book getword pzPendingImfile $pageName md5sum -var MD5SUM
     208        book getword pzPendingImfile $pageName dateobs -var DATEOBS
     209
     210        # figure out filename
     211        $FILENAME = $workdir/$EXP_NAME.$CLASS_ID.fits
     212
     213        book setword pzPendingImfile $pageName filename FILENAME
    191214
    192215        # store the pageName with this job
    193216        options $pageName
    194217
    195         $run = dsget --uri $URI --filename $workdir/$EXP_NAME.$CLASS_ID.fits --bytes $BYTES --md5 $MD5SUM
     218        if ($MD5SUM == 0)
     219            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES
     220        else
     221            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES --md5 $MD5SUM
     222        end
    196223
    197224        # create the command line
     
    205232    task.exit 0
    206233        # get related info from the associated page
    207         book getword pzPendingImfile $options:0 uri -var URI
    208234        book getword pzPendingImfile $options:0 exp_name -var EXP_NAME
     235        book getword pzPendingImfile $options:0 class -var CLASS
     236        book getword pzPendingImfile $options:0 camera -var CAMERA
     237        book getword pzPendingImfile $options:0 telescope -var TELESCOPE
    209238        book getword pzPendingImfile $options:0 class_id -var CLASS_ID
    210         book getword pzPendingImfile $options:0 bytes -var BYTES
    211         book getword pzPendingImfile $options:0 md5sum -var MD5SUM
     239        book getword pzPendingImfile $options:0 filename -var FILENAME
    212240
    213241        # update the database with the success
    214         $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri  $workdir/$EXP_NAME.$CLASS_ID.fits
     242        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME
    215243
    216244        # create the command line
     
    221249
    222250        # update the pantasks process tables
    223         process_exit pzPendingExp $options:0 $JOB_STATUS
     251        process_exit pzPendingImfile $options:0 $JOB_STATUS
    224252    end
    225253
    226254    task.exit default
    227255        showcommand failure
    228         book setword pzPendingImfile $options:0 pantaskState $JOB_STATUS
     256        process_exit pzPendingImfile $options:0 $JOB_STATUS
    229257    end
    230258
Note: See TracChangeset for help on using the changeset viewer.