IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2008, 5:42:05 PM (18 years ago)
Author:
bills
Message:

get web page working again with job sequencing through the database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstampwebrequest.sh

    r16280 r16283  
    1212#
    1313# Note: there's nothing really web specific about this program.
     14#       with the exception that we set up the environment to allow a
     15#       random user (in this case apache ) to run ipp programs
     16#
     17# TODO: re-write this in perl
    1418#
    1519###
     
    4246
    4347# These variables need to be customized for a particular installation
    44 BASE_DIR=/export/data1/bills/pstamp
    4548export PSCONFDIR=/export/data0/bills/psconfig
    4649
     
    4851export LD_LIBRARY_PATH=/usr/local/lib
    4952
     53WORK_DIR=/export/data1/bills/pstamp/work
     54CMD_DIR=/export/data0/bills/src/ipp/pstamp/scripts
     55
    5056#### END LOCAL_CONFIGURATION
    5157
    52 WORK_DIR=$BASE_DIR/work
    53 CMD_DIR=$BASE_DIR/bin
    5458export HOME=$WORK_DIR
    5559
     
    6771
    6872
    69 ## configure IPP
     73###
     74### configure IPP
     75###
    7076export MANPATH=""
    7177
    7278source $PSCONFDIR/psconfig.bash default
    7379
     80###
     81### Add our command directory to the path. This won't be necessary once the scripts get
     82### installed in the IPP
     83###
    7484PATH=${CMD_DIR}:${PATH}
    7585
     
    149159
    150160###
    151 ### TODO: Won't it interfere with pantask's job processing?
    152 ###
    153 ### Queue jobs for the request
     161### TODO: Until we have pantasks monitoring the reuest and job table
     162### run things directly
     163
     164
     165###
     166### Queue the jobs for the request
    154167###
    155168pstampparser_run.pl $request_id  1> $parse_out 2> $parse_err
     
    166179fi
    167180
    168 cat $parse.out
    169 
    170 ### for each line in the output add a psJob to the
    171 
    172181###
    173182### Ok now it's time to build the stamps
     183###
    174184
    175185stamp_out=stamp.${out_ext}
    176186stamp_err=stamp.${err_ext}
    177187
    178 echo making stamps > $stamp_err
    179 
    180 ###
    181 ### Make the stamps
     188echo making stamps for request> $stamp_err
     189
     190###
     191### Make the stamps by executing each of the jobs
    182192###
    183193pstamp_dorequest.pl $request_id 1>$stamp_out 2>>$stamp_err
    184194if [[ $? != 0 ]]; then
    185     echo makestamps.pl failed
     195    echo pstamp_do_request.pl failed
    186196    echo STDERR:
    187197    cat $stamp_err
     
    192202fi
    193203
    194 # Success print the output
    195 # get the stamp urls
    196 cat $stamp_out
     204# Success print the urls
     205pstamptool -listjob -req_id $request_id -simple | awk '{ print $6 ".fits" }'
    197206
    198207cleanup
Note: See TracChangeset for help on using the changeset viewer.