IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 3, 2011, 12:44:36 PM (15 years ago)
Author:
rhenders
Message:

improved logic for determining processed and failed items

File:
1 edited

Legend:

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

    r31864 r32002  
    5959    TODO
    6060    '''
    61     def getProcessedIDsForThisStage(self, batchType, startDate):
     61    def getProcessedIDsForThisStage(self, batchType, epoch, dvoGpc1Label):
    6262
    6363        sql = "SELECT DISTINCT stage_id \
    6464               FROM batch \
    6565               WHERE batch_type = '" + batchType + "' \
    66                AND timestamp > '" + startDate + "' \
     66               AND timestamp > '" + epoch + "' \
     67               AND dvo_db = '" + dvoGpc1Label + "' \
    6768               AND loaded_to_datastore"
    6869
     
    157158    TODO
    158159    '''
    159     def getFailedBatches(self, batchType, startTime, endTime=""):
     160    def getFailedBatches(self, batchType, epoch, dvoGpc1Label):
    160161
    161162        sql = "SELECT DISTINCT stage_id \
    162163               FROM batch \
    163                WHERE timestamp > '" + startTime + "' \
     164               WHERE timestamp > '" + epoch + "' \
    164165               AND batch_type = '" + batchType + "' \
     166               AND dvo_db = '" + dvoGpc1Label + "' \
    165167               AND !processed"
    166168
Note: See TracChangeset for help on using the changeset viewer.