IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30016


Ignore:
Timestamp:
Dec 10, 2010, 12:03:04 PM (15 years ago)
Author:
bills
Message:

Examine the req_name for requests that come in over the web update page.
If it has a familiar form adjust the label.

File:
1 edited

Legend:

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

    r29578 r30016  
    126126}
    127127
     128# Adjust the label for requests coming in over the web interaface
     129
     130my $label_changed = 0;
     131if ($label and $label eq "WEB.UP") {
     132    my $lcname = lc($req_name);
     133    if ($lcname =~ /pitt/) {
     134        $label = "PITT";
     135        $label_changed = 1;
     136    } elsif ($lcname =~ /cfa/) {
     137        $label = "CFA";
     138        $label_changed = 1;
     139    } elsif ($lcname =~ /durham/) {
     140        $label = "DURHAM";
     141        $label_changed = 1;
     142    } elsif ($lcname =~ /qub/) {
     143        $label = "QUB";
     144        $label_changed = 1;
     145    }
     146    print "Setting label for $req_name to $label\n" if $label_changed;
     147}
     148
     149
    128150if ($req_id and !$no_update) {
    129151    # update the database with the request name. This will be used as the
     
    131153    my $command = "$pstamptool -updatereq -req_id $req_id  -set_name $req_name";
    132154    $command .= " -set_outProduct $product";
     155    $command .= " -set_label $label" if $label_changed;
    133156    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    134157        run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.