Changeset 30812 for branches/eam_branches/ipp-20110213/pstamp
- Timestamp:
- Mar 6, 2011, 2:34:55 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110213/pstamp/scripts
- Files:
-
- 3 edited
-
pstamp_checkdependent.pl (modified) (6 diffs)
-
pstampparse.pl (modified) (5 diffs)
-
pstampstopfaulted (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/pstamp/scripts/pstamp_checkdependent.pl
r30676 r30812 27 27 my $IPP_DIFF_MODE_STACK_STACK = 4; 28 28 29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count );29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile); 30 30 my ($dbname, $ps_dbserver, $verbose, $save_temps, $no_update); 31 31 … … 40 40 'fault_count=i' => \$fault_count, 41 41 'max_fault_count=i' => \$max_fault_count, 42 'logfile=s' => \$logfile, 42 43 'dbname=s' => \$dbname, # postage stamp server dbname 43 44 'dbserver=s' => \$ps_dbserver, # postage stamp server dbserver … … 68 69 my $ipprc = PS::IPP::Config->new(); 69 70 71 if ($logfile) { 72 $ipprc->redirect_output($logfile); 73 } 74 70 75 if (!$ps_dbserver) { 71 76 $ps_dbserver = metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER'); … … 314 319 my $data_state = $metadata->{data_state}; 315 320 321 # The update system currently requires that data that has been magicked be destreaked 322 # at chip stage so it needs magic even if the customer doesn't. 323 if ($metadata->{magicked} != 0) { 324 $need_magic = 1; 325 } 326 316 327 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 317 328 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) { … … 350 361 foreach my $chip (@$data) { 351 362 $chip_id = $chip->{chip_id}; 352 if (($chip->{data_state} ne 'full') or ($need_magic and ($chip->{magicked} <= 0))) { 363 364 # if chip has been magicked before require it to be magicked again 365 # because the warp pending query requires it. 366 if ($chip->{magicked} < 0) { 367 print "Input has been destreaked so we must destreak before warping\n"; 368 $need_magic = 1 369 } 370 371 if ($need_magic and ($chip->{magicked} eq 0)) { 372 my_die("Client requires magic, but chip never magicked. How did this dependent get queued?", $PS_EXIT_PROG_ERROR); 373 } 374 375 if (($chip->{data_state} ne 'full') or ($need_magic and ($chip->{magicked} < 0))) { 353 376 $chips_ready = 0; 354 377 $chip->{fault} = $chip->{chip_fault}; … … 399 422 my $skycell = $metadata; 400 423 my $skycell_id = $skycell->{skycell_id}; 424 425 # The update system currently requires that data that has been magicked be destreaked 426 # at chip stage so it needs magic even if the customer doesn't. 427 if ($metadata->{magicked} != 0) { 428 $need_magic = 1; 429 } 401 430 402 431 if ($diff_mode == $IPP_DIFF_MODE_WARP_STACK ) { -
branches/eam_branches/ipp-20110213/pstamp/scripts/pstampparse.pl
r30565 r30812 31 31 my $no_update; 32 32 my $dest_requires_magic; 33 34 # set this to true to disable update processing 35 my $no_updates_allowed = 0; 33 36 34 37 GetOptions( … … 424 427 # and this user's data store destination is allowed uncensored stamps, so accept the request 425 428 $need_magic = 0; 429 430 # Since user can get unmagicked data "by coordinate" requests can go back in time 431 # to dredge unusable data from the "dark days"... 432 if ($req_type eq 'bycoord' and $mjd_min eq 0) { 433 # ... so unless the user sets mjd_min clamp it to 2009-04-01 434 # XXX: This value should live in the pstampProject table not be hardcoded here 435 $mjd_min = 54922; 436 } 426 437 } else { 427 438 print STDERR "Error row $rownum: User not authorized to to request uncensored stamps.\n"; … … 465 476 print "Time to locate_images for row $rownum $dtime_locate\n"; 466 477 467 # handle this XXX: what did I mean by this comment 478 # handle this 479 # XXX: what did I mean by that comment? 468 480 $row->{need_magic} = $need_magic; 469 481 470 482 $num_jobs += queueJobs($mode, \@rowList, $imageList); 471 483 472 # if a row slipped through with no jobs add one484 # if a row slipped through with no jobs add a faulted one 473 485 foreach my $row (@rowList) { 474 486 if ($row->{job_num} == 0) { … … 495 507 my $option_mask = $row->{OPTION_MASK}; 496 508 my $components = $row->{components}; 509 510 $option_mask |= $PSTAMP_NO_WAIT_FOR_UPDATE if $no_updates_allowed; 497 511 498 512 my $roi_string; … … 668 682 my $rownum = $row->{ROWNUM}; 669 683 my $option_mask = $row->{OPTION_MASK}; 684 685 $option_mask |= $PSTAMP_NO_WAIT_FOR_UPDATE if $no_updates_allowed; 670 686 671 687 # For dist_bundle we need -
branches/eam_branches/ipp-20110213/pstamp/scripts/pstampstopfaulted
r29428 r30812 1 #!/bin/bash 2 # 3 # script executed by the task pstamp.stopfaulted to stop proceessing of jobs 4 # and dependents that have fault_count >= some maximum value. That value is expected 5 # to be passed in as an argument otherwise the default in pstamptool is used 6 # All arguments are passed to pstamptool 1 7 2 # script executed by the task pstamp.stopfaulted to stop proceessing of jobs 3 # and dependents that have faulted 5 or more times 4 # all arguments to this script are passed to pstamptool 5 6 # 25 is PSTAMP_NOT_AVAILABLE 8 # note: 25 is PSTAMP_NOT_AVAILABLE 7 9 fault_code=25 8 fault_count=39 10 10 11 date 11 12 echo stopping faulted dependent jobs 12 pstamptool -stopdependentjob -set_fault $fault_code -fault_count $fault_count $* 13 cmd="pstamptool -stopdependentjob -set_fault $fault_code $*" 14 echo $cmd 15 $cmd 13 16 14 17 echo stopping faulted jobs 15 pstamptool -updatejob -state run -set_state stop -set_fault $fault_code -fault_count $fault_count $* 18 cmd="pstamptool -updatejob -state run -set_state stop -set_fault $fault_code $*" 19 echo $cmd 20 $cmd
Note:
See TracChangeset
for help on using the changeset viewer.
