IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25540


Ignore:
Timestamp:
Sep 24, 2009, 12:06:55 PM (17 years ago)
Author:
bills
Message:

if a request with a duplicate name is submitted invent a request name
and put the results there

Location:
trunk/pstamp/scripts
Files:
2 edited

Legend:

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

    r25317 r25540  
    177177        my $exp_id = $job->{exp_id};
    178178
    179         if ($fault eq $PSTAMP_DUP_REQUEST) {
     179        if (($fault eq $PSTAMP_DUP_REQUEST) and ($req_name eq "NULL")) {
    180180            # this request had a duplicate request name. We can't put the results
    181181            # on the data store since the product name is already used
     
    183183            stop_request_and_exit($req_id, $fault);
    184184        }
    185 
    186185        my ($row, $req_info, $project) = get_request_info($rows, $rownum);
    187186
     
    202201        }
    203202
    204         if (($job_type eq "stamp") || ($job_type eq "get_image")) {
     203        if (($job_type eq "stamp") || ($job_type eq "get_image") || ($job_type eq "none")) {
    205204            my $jreglist = "$out_dir/reglist$job_id";
    206205            if (open JRL, "<$jreglist") {;
     
    302301    my $rownum = shift;
    303302
     303    if ($rownum eq 0) {
     304        my $dummy_rowinfo = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|";
     305        return (undef, $dummy_rowinfo, "none");
     306    }
    304307    my $row = $rows->{$rownum};
     308
    305309
    306310    # these may be set to null during processing
  • trunk/pstamp/scripts/pstampparse.pl

    r25368 r25540  
    1616use File::Basename qw(basename);
    1717use Carp;
     18use POSIX qw( strftime );
    1819
    1920my $verbose;
     
    9899my_die("wrong EXTVER $extver found in $request_file_name", $PS_EXIT_PROG_ERROR) if ($extver ne "1");
    99100
     101
    100102# check for duplicate request name
     103my $duplicate_req_name = 0;
    101104if ($req_id and !$no_update) {
    102105    my $command = "$pstamptool -listreq  -name $req_name -not_req_id $req_id";
     
    109112    if ($success) {
    110113        # -listreq succeeded duplicate request name
     114        print STDERR "REQ_NAME $req_name has already been used\n";
    111115        insertFakeJobForRow(undef, 0, $PSTAMP_DUP_REQUEST);
    112         exit 0;
     116        $duplicate_req_name = 1;
     117        my $datestr = strftime "%Y%m%d%H%M%S.$req_id", gmtime;
     118        $req_name = "ERROR.$datestr";
     119        #exit 0;
    113120    }
    114121}
     
    126133        my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
    127134    }
     135}
     136if ($duplicate_req_name) {
     137    exit 0;
    128138}
    129139
Note: See TracChangeset for help on using the changeset viewer.