IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32654


Ignore:
Timestamp:
Nov 10, 2011, 3:59:12 PM (15 years ago)
Author:
rhenders
Message:

Removed redundant getAllUnfinishedBatchIDs() method. Not needed by ODM polling code anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/ipptopspsdb.py

    r32580 r32654  
    125125
    126126        self.logger.debug("Found %d processed but-not-on-datastore items" % len(ids))
    127 
    128         return ids
    129 
    130     '''
    131     Returns a list of processed batch IDs that either not yet loaded to the ODM or not merge_worthy or not merged
    132     NOTE we exclude batches already deleted from the datastore, as sometimes we delete stuff prior to loading to ODM if there is a known problem with the batch
    133     '''
    134     def getAllUnfinishedBatchIDs(self, epoch, dvoGpc1Label, batchType):
    135 
    136         sql = "SELECT batch_id \
    137                FROM batch \
    138                WHERE timestamp > '" + epoch + "' \
    139                AND dvo_db = '" + dvoGpc1Label + "' \
    140                AND loaded_to_datastore = 1 \
    141                AND batch_type = '" + batchType + "' \
    142                AND deleted_datastore = 0 \
    143                AND loaded_to_ODM != -1 \
    144                AND merge_worthy != -1 \
    145                AND merged = 0"
    146 
    147         ids = []
    148         try:
    149             rs = self.executeQuery(sql)
    150             while (rs.next()):
    151                 ids.append(rs.getInt(1))
    152         except:
    153             self.logger.exception("Can't query for unloaded batch ids in ipptopsps Db")
    154 
    155         rs.close()
    156 
    157         self.logger.debug("Found %d unloaded items" % len(ids))
    158127
    159128        return ids
Note: See TracChangeset for help on using the changeset viewer.