- Timestamp:
- Aug 20, 2009, 12:42:13 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pstamp/scripts/pstampparse.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk merged: 25052-25060,25063-25068,25070-25084,25087,25156
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/pstamp/scripts/pstampparse.pl
r25143 r25158 14 14 use PS::IPP::PStamp::Job qw( :standard ); 15 15 use File::Temp qw(tempfile); 16 use Carp;17 16 18 17 my $verbose; … … 97 96 my_die("wrong EXTVER $extver found in $request_file_name", $PS_EXIT_PROG_ERROR) if ($extver ne "1"); 98 97 99 # check for duplicate request name 100 if (!$no_update) { 98 { 101 99 my $command = "$pstamptool -listreq -name $req_name"; 102 100 $command .= " -dbname $dbname" if $dbname; 103 101 $command .= " -dbserver $dbserver" if $dbserver; 104 # no verbose so that error message about request not found doesn't appear in parse_error.txt105 102 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 106 run(command => $command, verbose => 0);103 run(command => $command, verbose => $verbose); 107 104 my $exitStatus = $error_code >> 8; 108 105 if ($success) { … … 186 183 187 184 my $option_mask= $row->{OPTION_MASK}; 188 my $inverse = ($option_mask & $PSTAMP_SELECT_INVERSE) ? 1 : 0;189 $row->{inverse} = $inverse;190 185 191 186 my $skycenter = $row->{skycenter} = ! ($row->{COORD_MASK} & $PSTAMP_CENTER_IN_PIXELS); … … 252 247 next; 253 248 } else { 254 # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this249 # Call PS::IPP::PStamp::Job's locate_images subroutine to get the parameters for this 255 250 # request specification. An array reference is returned. 256 251 my ($x, $y); 257 258 252 $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $search_component, 259 $inverse, $skycenter, $x, $y, $mjd_min, $mjd_max, $filter, $verbose); 260 253 $skycenter, $x, $y, $mjd_min, $mjd_max, $filter, $verbose); 261 254 if (!$imageList or !@$imageList) { 262 255 print STDERR "no matching images found for row $rownum\n" if $verbose; … … 289 282 my $have_skycells = shift; 290 283 my $need_magic = shift; 291 my $num_jobs = 0;292 284 293 285 my $rownum = $row->{ROWNUM}; 294 286 295 287 my $components = $row->{components}; 288 my $numComponents = scalar keys %$components; 289 if ( $numComponents == 0 ) { 290 print STDERR "no jobs for row $rownum\n" if $verbose; 291 insertFakeJobForRow($row, 1, $PSTAMP_NO_JOBS_QUEUED); 292 return 1; 293 } 296 294 297 295 my $roi_string; … … 374 372 my $fault = 0; 375 373 376 if (($stage ne 'stack') and ($stage ne 'raw')) { 377 if (($image->{state} eq 'goto_purged') or ($image->{data_state} eq 'purged')) { 378 $newState = 'stop'; 379 $fault = $PSTAMP_GONE; 380 } elsif (($image->{data_state} ne 'full') or ($image->{state} ne 'full' )) { 381 # XXX here is where we need to queue an update job 382 # for now just say that the image is not available 383 $newState = 'stop'; 384 $fault = $PSTAMP_NOT_AVAILABLE; 385 } 386 } 374 if (0) { 375 # XXX this doesn't work because not all ippTools outputs include data_state 376 # fix chipTool also need to not make this test for raw stage 377 if ((($stage ne 'stack') and ($image->{data_state} ne 'full')) or $image->{state} ne 'full' ){ 378 # XXX here is where we need to queue an update job 379 # for now just say that the image is not available 380 $newState = 'stop'; 381 $fault = 49; 382 } 383 } 387 384 388 385 $num_jobs++; … … 412 409 print "skipping command: $command\n"; 413 410 } 414 }415 if ( $num_jobs == 0 ) {416 print STDERR "no jobs for row $rownum\n" if $verbose;417 insertFakeJobForRow($row, 1, $PSTAMP_NO_OVERLAP);418 $num_jobs = 1;419 411 } 420 412 return $num_jobs; … … 624 616 return 0 if ($r1->{IMG_TYPE} ne $r2->{IMG_TYPE}); 625 617 return 0 if ($r1->{ID} ne $r2->{ID}); 626 return 0 if ($r1->{inverse} ne $r2->{inverse});627 618 628 619 if (defined($r1->{COMPONENT})) {
Note:
See TracChangeset
for help on using the changeset viewer.
