IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32141 for trunk/ippToPsps


Ignore:
Timestamp:
Aug 19, 2011, 11:48:34 AM (15 years ago)
Author:
rhenders
Message:

changed updateMinMaxObjID() method to updateDetectionStats(); now storing total detections in the Db; getMergedButNotDeletedBatchIDs() method now taking batch type as arg

File:
1 edited

Legend:

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

    r32122 r32141  
    5959    Returns a list of processed batch IDs that are merged but not yet deleted
    6060    '''
    61     def getMergedButNotDeletedBatchIDs(self, epoch, dvoGpc1Label):
     61    def getMergedButNotDeletedBatchIDs(self, batchType, epoch, dvoGpc1Label):
    6262
    6363        sql = "SELECT DISTINCT batch_id \
    6464               FROM batch \
    6565               WHERE timestamp > '" + epoch + "' \
     66               AND batch_type = '" + batchType + "' \
    6667               AND dvo_db = '" + dvoGpc1Label + "' \
    6768               AND merged \
     
    174175
    175176        hours = minutes/60.0
    176         days = float(hours)/24.0
    177         weeks = float(days)/7.0
     177        days = hours/24.0
     178        weeks = days/7.0
    178179
    179180        if minutes < 60: return "%.1f minutes ago" % minutes
     
    237238    Updates min/max object ID on this table and batch
    238239    '''
    239     def updateMinMaxObjID(self, batchID, minObjID, maxObjID):
     240    def updateDetectionStats(self, batchID, minObjID, maxObjID, totalDetections):
    240241
    241242        sql = "UPDATE batch SET \
    242243               min_obj_id = " + str(minObjID) + ", \
    243                max_obj_id = " + str(maxObjID) + " \
     244               max_obj_id = " + str(maxObjID) + ", \
     245               total_detections = " + str(totalDetections) + " \
    244246               WHERE batch_id = " + str(batchID)
    245247
Note: See TracChangeset for help on using the changeset viewer.