IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16376


Ignore:
Timestamp:
Feb 8, 2008, 10:24:44 AM (18 years ago)
Author:
eugene
Message:

moving dsget call within standard type of wrapped with db error status updates

File:
1 edited

Legend:

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

    r16370 r16376  
    33
    44## XXX note that this currently works with a single database as defined in .ipprc
     5## XXX tie the database for output to the database from which the datastore was determined
    56
    67# pztool -adddatastore -inst isp -telescope ps1 -uri http://otis1.ifa.hawaii.edu/ds/skyprobe/index.txt
     
    293294        book setword pzPendingImfile $pageName pantaskState RUN
    294295
    295         book getword pzPendingImfile $pageName uri -var URI
    296         book getword pzPendingImfile $pageName exp_name -var EXP_NAME
    297         book getword pzPendingImfile $pageName class_id -var CLASS_ID
    298         book getword pzPendingImfile $pageName bytes -var BYTES
    299         book getword pzPendingImfile $pageName md5sum -var MD5SUM
    300         book getword pzPendingImfile $pageName dateobs -var DATEOBS
    301         book getword pzPendingImfile $pageName camera -var $CAMERA
     296        book getword pzPendingImfile $pageName uri       -var URI
     297        book getword pzPendingImfile $pageName bytes     -var BYTES
     298        book getword pzPendingImfile $pageName md5sum    -var MD5SUM
     299        book getword pzPendingImfile $pageName dateobs   -var DATEOBS
     300        book getword pzPendingImfile $pageName exp_name  -var EXP_NAME
     301        book getword pzPendingImfile $pageName camera    -var CAMERA
     302        book getword pzPendingImfile $pageName telescope -var TELESCOPE
     303        book getword pzPendingImfile $pageName class     -var CLASS
     304        book getword pzPendingImfile $pageName class_id  -var CLASS_ID
    302305
    303306        set.host.for.camera $CAMERA $CLASS_ID
     
    328331        book setword pzPendingImfile $pageName filename $FILENAME
    329332
    330         # store the pageName with this job
    331         options $pageName $workdir
    332 
    333         $run = dsget --uri $URI --filename $FILENAME
     333        $run = summit_copy.pl --uri $URI --filename $FILENAME --exp_name $EXP_NAME --inst $CAMERA --telescope $TELESCOPE --class $CLASS --class_id $CLASS_ID --end_stage reg --workdir $workdir
    334334        if ($COMPRESS)
    335335            $run = $run --compress
     
    343343            $run = $run --nebulous
    344344        end
     345        add_standard_args run
     346
     347        # store the pageName for future reference below
     348        options $pageName
    345349
    346350        # create the command line
     
    348352          echo command $run
    349353        end
    350 
    351354        command $run
    352355    end
    353356
    354     # success
    355     task.exit 0
    356         # get related info from the associated page
    357         book getword pzPendingImfile $options:0 exp_name -var EXP_NAME
    358         book getword pzPendingImfile $options:0 class -var CLASS
    359         book getword pzPendingImfile $options:0 camera -var CAMERA
    360         book getword pzPendingImfile $options:0 telescope -var TELESCOPE
    361         book getword pzPendingImfile $options:0 class_id -var CLASS_ID
    362         book getword pzPendingImfile $options:0 filename -var FILENAME
    363 
    364         # we need to set the values of tess_id, dvodb, end_stage, workdir here
    365         # these are functions of (at least) EXP_TYPE and SURVEY_ID, both of which should come from the data store
    366 
    367         # we saved the workdir so we can pass it to pztool
    368         $workdir = $options:1
    369 
    370         # update the database with the success
    371         # for the moment, let's not propagate these
    372         $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $workdir -end_stage reg
    373         # tess_id, dvodb, workdir, end_stage
    374 
    375         # create the command line
    376         if ($VERBOSE > 1)
    377           echo exec $run
    378         end
    379         exec $run
    380 
    381         # update the pantasks process tables
     357    # default exit status
     358    task.exit default
    382359        process_exit pzPendingImfile $options:0 $JOB_STATUS
    383360    end
    384361
    385     task.exit default
    386         showcommand failure
    387 
    388         # get related info from the associated page
    389         book getword pzPendingImfile $options:0 exp_name -var EXP_NAME
    390         book getword pzPendingImfile $options:0 class -var CLASS
    391         book getword pzPendingImfile $options:0 camera -var CAMERA
    392         book getword pzPendingImfile $options:0 telescope -var TELESCOPE
    393         book getword pzPendingImfile $options:0 class_id -var CLASS_ID
    394         book getword pzPendingImfile $options:0 filename -var FILENAME
    395 
    396         # we saved the workdir so we can pass it to pztool
    397         $workdir = $options:1
    398 
    399         # update the database with the fault state
    400         $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $workdir -code $JOB_STATUS -end_stage reg
    401 
    402         # create the command line
    403         if ($VERBOSE > 1)
    404           echo exec $run
    405         end
    406         exec $run
    407 
    408         # update the pantasks process tables
    409         process_exit pzPendingImfile $options:0 $JOB_STATUS
    410     end
    411 
     362    # operation timed out?
    412363    task.exit timeout
    413364        showcommand timeout
Note: See TracChangeset for help on using the changeset viewer.