IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 28, 2008, 2:06:45 PM (18 years ago)
Author:
bills
Message:

remove reference to obsolete program

File:
1 edited

Legend:

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

    r18623 r19265  
    2222    'verbose'       =>  \$verbose,
    2323    'dbname=s'      =>  \$dbname,
    24     'limit=s'       =>  \$limit,
     24    'limit=i'       =>  \$limit,
    2525);
    2626
     
    119119        my $out_buf = join("", @$stdout_buf);
    120120        # split raw output into lines
    121         # XXX: why do I think that i need the map?
    122         #my @lines = map {split "\n"} $raw_output;
    123121        @lines = split /^/, $out_buf;
    124122    }
     
    127125    # each line contains a fileset
    128126    #
    129     # XXX: we probably should set a limit on the number of these we process
    130     # otherwise this could take a long time and the task could time out
     127
     128    # number that we've processed
     129    my $numFilesets = 0;
    131130    foreach my $line (@lines) {
    132131        # parse the line into fields split by whitespace
    133132        my ($uri, $fs_name, $date, $type) = split " ", $line;
    134133
     134        # skip comment lines
    135135        next if ( $uri =~ /^#.*/);
     136
     137        $numFilesets++;
    136138
    137139        my @files;
     
    163165                my $command = "$pstamptool -addreq -uri $req_uri -ds_id $ds_id";
    164166                $command .= " -dbname $dbname" if $dbname;
     167
    165168                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    166169                        run(command => $command, verbose => $verbose);
    167                     unless ($success) {
    168                         # XXX: what do we do now?
    169                         die("Unable to perform $command: $error_code");
    170                     }
     170
     171                unless ($success) {
     172                    die("Unable to perform $command: $error_code");
     173                }
    171174            }
    172             $lastFileset = $fs_name;
    173175        }
     176        $lastFileset = $fs_name;
     177        last if ($numFilesets >= $limit);
    174178    }
    175179
    176180    ## now update the last_fileset column in pstampDataStore
    177     ## XXX: we should probably do this before we process the fileset. Otherwise
    178     ## if we get an error from pstamptool we'll get stuck processing it over and over.
     181    ## XXX: we should perhaps do this while processing each fileset so that if a later
     182    ## one has an error we don't get repeats.
     183
    179184    if ($lastFileset) {
    180185        # print "last fileset: $lastFileset\n";
Note: See TracChangeset for help on using the changeset viewer.