IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 6, 2010, 1:55:20 PM (16 years ago)
Author:
bills
Message:

Various changes to the postage stamp server and associated tables.
Implemented cleanup. Added pstampRequest.outdir changed spelling of out_dir
to outdir. various other cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/dquery_finish.pl

    r27859 r27874  
    2020use PS::IPP::Config qw( :standard );
    2121
    22 my ( $req_id, $req_name, $req_file, $product, $out_dir, $dbname, $dbserver, $verbose, $save_temps );
     22my ( $req_id, $req_name, $req_file, $product, $outdir, $dbname, $dbserver, $verbose, $save_temps );
    2323
    2424GetOptions(
     
    2727           'req_file=s' => \$req_file,
    2828           'product=s'  => \$product,
    29            'out_dir=s'  => \$out_dir,
     29           'outdir=s'   => \$outdir,
    3030           'dbname=s'   => \$dbname,
    3131           'dbserver=s' => \$dbserver,
     
    4141$err .= "--req_name is required\n" if !$req_name;
    4242$err .= "--product is required\n" if !$product;
    43 $err .= "--out_dir is required\n" if !$out_dir;
     43$err .= "--outdir is required\n" if !$outdir;
    4444
    4545die "$err" if $err;
     
    7676    die "product directory does not exist $prod_dir";
    7777}
    78 my $out_dir = "$prod_dir/$req_name";
     78my $outdir = "$prod_dir/$req_name";
    7979}
    80 if (! -e $out_dir ) {
     80if (! -e $outdir ) {
    8181    # something must have gone wrong at the parse stage
    82     print STDERR "output fileset directory $out_dir does not exist\n" if $verbose;
    83     if (! mkdir $out_dir ) {
     82    print STDERR "output fileset directory $outdir does not exist\n" if $verbose;
     83    if (! mkdir $outdir ) {
    8484        stop_request($req_id, $PS_EXIT_SYS_ERROR, $verbose);
    85         die "cannot create output directory $out_dir";
     85        die "cannot create output directory $outdir";
    8686    }
    87 } elsif (! -d $out_dir) {
     87} elsif (! -d $outdir) {
    8888    stop_request($req_id, $PS_EXIT_SYS_ERROR, $verbose);
    89     die "output fileset directory $out_dir exists but is not a directory";
     89    die "output fileset directory $outdir exists but is not a directory";
    9090}
    9191
     
    118118
    119119# XXX: have the jobs produce the reglist as with postage stamp requests
    120 my ($REGLIST, $reg_list) = tempfile("$out_dir/reqlist.XXXX", UNLINK => !$save_temps);
     120my ($REGLIST, $reg_list) = tempfile("$outdir/reqlist.XXXX", UNLINK => !$save_temps);
    121121
    122122foreach my $job (@jobs) {
    123123    my $job_id = $job->{job_id};
    124124    my $response_file = "response${job_id}.fits";
    125     my $response_path = "$out_dir/$response_file";
     125    my $response_path = "$outdir/$response_file";
    126126
    127127    if (-e $response_path) {
     
    131131        # do the same if we have an error file.  Should the parse data be uploaded as well?
    132132        my $err_file = "parse_error.txt";
    133         if (-e "$out_dir/$err_file") {
     133        if (-e "$outdir/$err_file") {
    134134            print $REGLIST "$err_file|||text|\n";
    135135        }
     
    143143if (-s $reg_list) {
    144144    my $command = "$dsreg --add $req_name --product $product --list $reg_list";
    145     $command .= " --copy --datapath $out_dir";
     145    $command .= " --copy --datapath $outdir";
    146146    $command .= " --type MOPS_DETECTABILITY_RESPONSE";
    147147    $command .= " --ps0 $req_id";
     
    166166    my $verbose = shift;
    167167   
    168     my $command = "$pstamptool -updatereq -req_id $req_id -state stop";
    169     $command   .= " -fault $fault" if $fault;
     168    my $command = "$pstamptool -updatereq -req_id $req_id -set_state stop";
     169    $command   .= " -set_fault $fault" if $fault;
    170170    $command   .= " -dbname $dbname" if $dbname;
    171171    $command   .= " -dbserver $dbserver" if $dbserver;
Note: See TracChangeset for help on using the changeset viewer.