IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30295


Ignore:
Timestamp:
Jan 19, 2011, 9:44:20 AM (15 years ago)
Author:
rhenders
Message:

added method to return whetehr a batch is currently MergeWorthy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm

    r29998 r30295  
    252252#######################################################################################
    253253#
     254# Checks whether this exposure is 'MergeWorthy'
     255#
     256########################################################################################
     257sub isMergeWorthy {
     258        my ($self, $expId) = @_;
     259
     260        my $query = $self->{_db}->prepare(<<SQL);
     261        SELECT COUNT(*)
     262            FROM batches
     263            WHERE exp_id = $expId
     264            AND merge_worthy
     265SQL
     266
     267    $query->execute;
     268
     269    return scalar $query->fetchrow_array();
     270}
     271
     272
     273#######################################################################################
     274#
    254275# Checks whether this exposure has a min object ID under old PSPS hard limit of 72010000000000001
    255276#
     
    262283        FROM batches
    263284        WHERE exp_id = $expId
     285        AND min_obj_id > 0
    264286        AND min_obj_id < 72010000000000001
    265287SQL
Note: See TracChangeset for help on using the changeset viewer.