Changeset 32002
- Timestamp:
- Aug 3, 2011, 12:44:36 PM (15 years ago)
- Location:
- trunk/ippToPsps/jython
- Files:
-
- 2 edited
-
ipptopspsdb.py (modified) (2 diffs)
-
metrics.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopspsdb.py
r31864 r32002 59 59 TODO 60 60 ''' 61 def getProcessedIDsForThisStage(self, batchType, startDate):61 def getProcessedIDsForThisStage(self, batchType, epoch, dvoGpc1Label): 62 62 63 63 sql = "SELECT DISTINCT stage_id \ 64 64 FROM batch \ 65 65 WHERE batch_type = '" + batchType + "' \ 66 AND timestamp > '" + startDate + "' \ 66 AND timestamp > '" + epoch + "' \ 67 AND dvo_db = '" + dvoGpc1Label + "' \ 67 68 AND loaded_to_datastore" 68 69 … … 157 158 TODO 158 159 ''' 159 def getFailedBatches(self, batchType, startTime, endTime=""):160 def getFailedBatches(self, batchType, epoch, dvoGpc1Label): 160 161 161 162 sql = "SELECT DISTINCT stage_id \ 162 163 FROM batch \ 163 WHERE timestamp > '" + startTime+ "' \164 WHERE timestamp > '" + epoch + "' \ 164 165 AND batch_type = '" + batchType + "' \ 166 AND dvo_db = '" + dvoGpc1Label + "' \ 165 167 AND !processed" 166 168 -
trunk/ippToPsps/jython/metrics.py
r31995 r32002 17 17 18 18 allIDs = gpc1Db.getIDsInThisDVODbForThisStage(dvoGpc1Label, batchType) 19 processedIDs = ippToPspsDb.getProcessedIDsForThisStage(batchType, epoch )20 failedIDs = ippToPspsDb.getFailedBatches(batchType, epoch )19 processedIDs = ippToPspsDb.getProcessedIDsForThisStage(batchType, epoch, dvoGpc1Label) 20 failedIDs = ippToPspsDb.getFailedBatches(batchType, epoch, dvoGpc1Label) 21 21 unprocessedIDs = list(set(allIDs) - set(processedIDs)) 22 22 … … 25 25 len(allIDs), 26 26 len(processedIDs), 27 len(list(set(failedIDs) - set( allIDs))),27 len(list(set(failedIDs) - set(processedIDs))), 28 28 len(unprocessedIDs), 29 29 ippToPspsDb.getLastBatchPublished(batchType)))
Note:
See TracChangeset
for help on using the changeset viewer.
