IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 19, 2010, 6:50:13 PM (16 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/pstamp/scripts/detectability_respond.pl

    r28794 r28980  
    108108# Parse input request file using detect_query_read (as it's already written).
    109109#
    110     my $dqr_command = "$detect_query_read --input $request_file";
     110    my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file";
    111111    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    112112        run(command => $dqr_command, verbose => $verbose);
     
    308308}
    309309close(WISDOM);
     310
     311# If there is anything that needs to be updated, create the update request list, and then exit the program.
    310312my $exit_code = 0;
    311313my $update_request_file = "${workdir}/update_request.dat";
     
    316318            $exit_code = 25;
    317319        }
     320        elsif ($fault != 0) {
     321            $exit_code = 21;
     322        }
    318323        my $update_request = join ' ', @{ $update_request{$images}{$fault} };
    319324        print UPDATE_REQUEST "$update_request\n";
     
    321326}
    322327close(UPDATE_REQUEST);
    323 # if ($exit_code != 0) {
    324 #     exit($exit_code);
    325 # }
     328if ($exit_code != 0) {
     329    exit($exit_code);
     330}
    326331
    327332# This duplicates stuff returned by PSTAMP, but my thought is to convert that ---^ into a conditional, in which I read
     
    338343    }
    339344}
    340 #exit(10);
    341345
    342346# run ppCoord and psphotForced to calculate the required data.
     
    569573        $columns = [
    570574            # matching rownum from detectability original request
    571             { name => 'ROWNUM',   type => 'V', writetype => TULONG },
     575            { name => 'ROWNUM',   type => '20A', writetype => TSTRING },
    572576            # any errors that occurred during processing
    573577            { name => 'ERROR_CODE',   type => 'V', writetype => TULONG },
     
    715719#       print STDERR "$writeType $i $numRows $colName $status @{ $colData{$colName} }\n";
    716720        $outFits->write_col( $writeType, $i + 1, 1, 1, $numRows, $colData{$colName}, $status );
     721#       print "$writeType $i $numRows $colName $status\n";
    717722        check_fitsio( $status );
    718        
    719723    }
    720724    $outFits->close_file( $status );
     
    730734        my $msg;                # Message to output
    731735        Astro::FITS::CFITSIO::fits_get_errstatus( $status , $msg );
     736        carp("CFITSIO error: $status => $msg");
    732737        die "CFITSIO error: $msg\n";
    733738    }
Note: See TracChangeset for help on using the changeset viewer.