Changeset 33266
- Timestamp:
- Feb 14, 2012, 4:31:36 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/ipptopspsdb.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopspsdb.py
r33259 r33266 50 50 51 51 ''' 52 Returns a list of batch IDs marked as 'purged' but not yet deleted 53 ''' 54 def getPurgedButNotDeletedBatchIDs(self, batchType, epoch, dvoGpc1Label, column): 55 56 sql = "SELECT DISTINCT batch_id \ 57 FROM batch \ 58 WHERE timestamp > '" + epoch + "' \ 59 AND batch_type = '" + batchType + "' \ 60 AND dvo_db = '" + dvoGpc1Label + "' \ 61 AND purged = 1 \ 62 AND " + column + " = 0" 63 64 ids = [] 65 try: 66 rs = self.executeQuery(sql) 67 while (rs.next()): 68 ids.append(rs.getInt(1)) 69 except: 70 self.logger.exception("Can't query for merged batch ids in ipptopsps Db") 71 72 rs.close() 73 74 self.logger.debug("Found %d merged but un-deleted items" % len(ids)) 75 76 return ids 77 78 ''' 52 79 Returns a list of processed batch IDs that have been loaded to the ODM but not yet deleted 53 80 ''' … … 99 126 def getLoadedToODMButNotDeletedFromDXLayer(self, batchType, epoch, dvoGpc1Label): 100 127 return self.getLoadedToODMButNotDeletedBatchIDs(batchType, epoch, dvoGpc1Label, "deleted_dxlayer") 128 129 ''' 130 Returns a list of purged batch IDs that not deleted from local disk 131 ''' 132 def getPurgedButNotDeletedFromLocalDisk(self, batchType, epoch, dvoGpc1Label): 133 return self.getPurgedButNotDeletedBatchIDs(batchType, epoch, dvoGpc1Label, "deleted_local") 134 135 ''' 136 Returns a list of purged batch IDs that are not deleted from datastore 137 ''' 138 def getPurgedButNotDeletedFromDatastore(self, batchType, epoch, dvoGpc1Label): 139 return self.getPurgedButNotDeletedBatchIDs(batchType, epoch, dvoGpc1Label, "deleted_datastore") 101 140 102 141 … … 454 493 def updateOdmStatus(self, batchID, odmStatus): 455 494 456 if odmStatus['LOADFAILED'] == 1: loadedToODM = -1457 else: loadedToODM = odmStatus['LOADEDTOODM']458 495 sql = "UPDATE batch \ 459 SET loaded_to_ODM = " + str( loadedToODM) + ", \496 SET loaded_to_ODM = " + str(odmStatus['LOADEDTOODM']) + ", \ 460 497 merge_worthy = " + str(odmStatus['MERGEWORTHY']) + ", \ 461 498 merged = " + str(odmStatus['MERGED']) + " \
Note:
See TracChangeset
for help on using the changeset viewer.
