- Timestamp:
- Aug 19, 2010, 6:50:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/pstamp/scripts/detectability_respond.pl
r28794 r28980 108 108 # Parse input request file using detect_query_read (as it's already written). 109 109 # 110 my $dqr_command = "$detect_query_read -- input $request_file";110 my $dqr_command = "$detect_query_read --dbname $imagedb --input $request_file"; 111 111 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 112 112 run(command => $dqr_command, verbose => $verbose); … … 308 308 } 309 309 close(WISDOM); 310 311 # If there is anything that needs to be updated, create the update request list, and then exit the program. 310 312 my $exit_code = 0; 311 313 my $update_request_file = "${workdir}/update_request.dat"; … … 316 318 $exit_code = 25; 317 319 } 320 elsif ($fault != 0) { 321 $exit_code = 21; 322 } 318 323 my $update_request = join ' ', @{ $update_request{$images}{$fault} }; 319 324 print UPDATE_REQUEST "$update_request\n"; … … 321 326 } 322 327 close(UPDATE_REQUEST); 323 #if ($exit_code != 0) {324 #exit($exit_code);325 #}328 if ($exit_code != 0) { 329 exit($exit_code); 330 } 326 331 327 332 # This duplicates stuff returned by PSTAMP, but my thought is to convert that ---^ into a conditional, in which I read … … 338 343 } 339 344 } 340 #exit(10);341 345 342 346 # run ppCoord and psphotForced to calculate the required data. … … 569 573 $columns = [ 570 574 # matching rownum from detectability original request 571 { name => 'ROWNUM', type => ' V', writetype => TULONG },575 { name => 'ROWNUM', type => '20A', writetype => TSTRING }, 572 576 # any errors that occurred during processing 573 577 { name => 'ERROR_CODE', type => 'V', writetype => TULONG }, … … 715 719 # print STDERR "$writeType $i $numRows $colName $status @{ $colData{$colName} }\n"; 716 720 $outFits->write_col( $writeType, $i + 1, 1, 1, $numRows, $colData{$colName}, $status ); 721 # print "$writeType $i $numRows $colName $status\n"; 717 722 check_fitsio( $status ); 718 719 723 } 720 724 $outFits->close_file( $status ); … … 730 734 my $msg; # Message to output 731 735 Astro::FITS::CFITSIO::fits_get_errstatus( $status , $msg ); 736 carp("CFITSIO error: $status => $msg"); 732 737 die "CFITSIO error: $msg\n"; 733 738 }
Note:
See TracChangeset
for help on using the changeset viewer.
