IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29648


Ignore:
Timestamp:
Nov 3, 2010, 8:19:43 AM (16 years ago)
Author:
rhenders
Message:

more options to filter results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/checkOdmStatus.pl

    r29301 r29648  
    2020my $filePath = undef;
    2121my $removeUnprocessed = undef;
     22my $onlyCheckUndeleted = undef;
     23my $onlyCheckMergeWorthy = undef;
    2224
    2325
     
    2830        'product|p=s' => \$product,
    2931        'location|l=s' => \$filePath,
     32        'onlyundeleted|u' => \$onlyCheckUndeleted,
     33        'onlymergeworthy|m' => \$onlyCheckMergeWorthy,
    3034        'remove|r' => \$removeUnprocessed,
    3135        'verbose|v' => \$verbose,
     
    4953if (!defined $filePath) {
    5054    print "* OPTIONAL: location for files to be deleted    -l <path>\n";
     55}
     56if (!defined $onlyCheckMergeWorthy) {
     57    $onlyCheckMergeWorthy = 0;
     58    print "* OPTIONAL: only check merge worthy batches     -m                   (default = $onlyCheckMergeWorthy)\n";
     59}
     60if (!defined $onlyCheckUndeleted) {
     61    $onlyCheckUndeleted = 0;
     62    print "* OPTIONAL: only check undeleted batches        -u                   (default = $onlyCheckUndeleted)\n";
    5163}
    5264if (!defined $removeUnprocessed) {
     
    117129
    118130        if (!$onDatastore) {next;}
     131        if ($onlyCheckUndeleted && $deleted) {next;}
     132        if ($onlyCheckMergeWorthy && !$mergeWorthy) {next;}
    119133
    120134        my $batch = ippToPsps::Batch->existing(
     
    212226
    213227    my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_odmXml.XXXX", UNLINK => !$save_temps);
    214     #print $response->content. "\n";
     228    if ($verbose) {print $response->content. "\n";}
    215229    print $tempFile $response->content;
    216230    close($tempFile);
     
    253267    ${$merged} = 0;
    254268
     269    if ($result =~ m/None/) { ${$loadedToOdm} = 1;}
    255270    if ($result =~ m/LoadStarted/) { ${$loadedToOdm} = 1;}
    256271    if ($result =~ m/MergeWorthy/) { ${$loadedToOdm} = 1; ${$mergeWorthy} = 1;}
Note: See TracChangeset for help on using the changeset viewer.