IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36476 for trunk/pstamp/scripts


Ignore:
Timestamp:
Feb 5, 2014, 10:58:58 AM (12 years ago)
Author:
bills
Message:

use ps_ud_$LABEL for updates instead of pstampDependent.rlabel (which is deprecated)
This works better if the request's label is changed after a dependent is queued

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_checkdependent.pl

    r36459 r36476  
    2727my $IPP_DIFF_MODE_STACK_STACK = 4;
    2828
    29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile);
     29my ($dep_id, $stage, $stage_id, $component, $imagedb, $label, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile);
    3030my ($dbname, $ps_dbserver, $verbose, $save_temps, $no_update);
    3131
     
    3636    'component=s'   =>  \$component,
    3737    'imagedb=s'     =>  \$imagedb,      # dbname for images lookups.
    38     'rlabel=s'      =>  \$rlabel,
     38    'label=s'       =>  \$label,        # request's label
     39    'rlabel=s'      =>  \$rlabel,       # pstampDependent.rlabel (deprecated)
    3940    'need_magic'    =>  \$need_magic,
    4041    'fault_count=i' =>  \$fault_count,
     
    7273   $ipprc->redirect_output($logfile);
    7374}
     75
     76if ($label) {
     77    # rlabel is deprecated. Use one based on the supplied label parameter which is the current label
     78    # for the request, which may be different than the one given to the dependent when the job was parsed.
     79    # XXX: having the convention that update label is 'ps_ud_' . $label of request embedded here
     80    # (and formerly in pstampparse.pl) is not particularly clean but it's simple.
     81    my $new_rlabel = 'ps_ud_' . $label;
     82    if ($new_rlabel ne $rlabel) {
     83        print "Notice: using $new_rlabel instead of $rlabel for update label.\n";
     84        $rlabel = $new_rlabel;
     85    }
     86}
     87
    7488
    7589if (!$ps_dbserver) {
     
    886900
    887901    # Stop faulting components. With the death of magic the likelyhood that something is truly gone
    888     # forever is much smaller. The false alarm rate due to temporary file system problems is far too high
     902    # forever is much smaller. The false alarm rate is far too high
    889903    return;
    890904
Note: See TracChangeset for help on using the changeset viewer.