Changeset 20256 for trunk/pstamp/scripts/pstampparse.pl
- Timestamp:
- Oct 17, 2008, 3:58:39 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r20221 r20256 123 123 } 124 124 125 my $num_jobs = 0; 125 126 foreach my $row (@$rows) { 126 127 my $rownum = $row->{ROWNUM}; … … 131 132 my $id = $row->{ID}; 132 133 my $class_id = $row->{CLASS_ID}; 133 my $stamp_name = $row->{STAMP_NAME};134 134 my $filter = $row->{REQFILT}; 135 135 my $mjd_min = $row->{MJD_MIN}; … … 142 142 my $option_mask= $row->{OPTION_MASK}; 143 143 144 $stamp_name = "" if $stamp_name eq "null";145 144 $class_id = "" if ($class_id eq "null" or $class_id eq "all"); 146 145 … … 193 192 194 193 if (!$images) { 195 print STDERR "no matching images found \n";196 exit $PS_EXIT_DATA_ERROR;194 print STDERR "no matching images found for row $rownum\n"; 195 next; 197 196 } 198 197 if ($mode eq "list_uri") { … … 223 222 } 224 223 close LISTFILE; 224 $num_jobs++; 225 225 my $command = "$pstamptool -addjob -req_id $req_id -job_type get_image" 226 226 . " -uri $listfile -outputBase $out_dir -rownum $rownum"; … … 255 255 my $output_base = "$out_dir/${rownum}_${job_num}"; 256 256 257 # By commenting out the next line, I hereby drop the use of STAMP_NAME258 # $output_base .= "_${stamp_name}" if $stamp_name;259 260 257 # add astrometry file for raw and chip images if one is available 261 258 if (($img_type eq "chip") || ($img_type eq "raw")) { … … 281 278 my $state = "run"; 282 279 280 $num_jobs++; 283 281 my $command = "$pstamptool -addjob -req_id $req_id -job_type $job_type" 284 282 . " -uri $uri -outputBase $output_base -args '$args' -rownum $rownum" … … 307 305 } 308 306 309 exit 0; 307 if ($mode eq "queue_jobs") { 308 if ($num_jobs) { 309 exit 0; 310 } else { 311 # no jobs queued return error to get the request stopped 312 # TODO: need to define meaningful error codes 313 exit $PS_EXIT_UNKNOWN_ERROR; 314 } 315 } else { 316 exit 0; 317 }
Note:
See TracChangeset
for help on using the changeset viewer.
