Changeset 32206 for trunk/ippToPsps/jython/ipptopsps.py
- Timestamp:
- Aug 29, 2011, 9:26:53 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/ipptopsps.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopsps.py
r32183 r32206 11 11 from gpc1db import Gpc1Db 12 12 from ipptopspsdb import IppToPspsDb 13 from datastore import Datastore 14 from batch import Batch 13 15 14 16 from initbatch import InitBatch 15 17 from stackbatch import StackBatch 16 18 from detectionbatch import DetectionBatch 19 20 ''' 21 Finds batches that processed ok, but did not get loaded to the datastore, then tries to load them 22 ''' 23 def publishAnyUnpublishedBatches(batchType): 24 25 batchIDs = ippToPspsDb.getProcessedButFailedDatastoreBatchIDs(EPOCH, DVOGPC1LABEL, batchType) 26 logger.infoPair("Failed load to datastore", "%d %s batches" % (len(batchIDs), batchType)) 27 28 for batchID in batchIDs: 29 30 batchName = Batch.getNameFromID(batchID) 31 subDir = Batch.getSubDir(BASEPATH, batchType, DVOGPC1LABEL) 32 tarballFile = Batch.getTarballFile(batchID) 33 logger.infoPair("Batch name", batchName) 34 35 Batch.publishToDatastore(datastore, ippToPspsDb, batchID, batchName, subDir, tarballFile) 36 17 37 18 38 ''' … … 105 125 gpc1Db = Gpc1Db(logger, configDoc) 106 126 ippToPspsDb = IppToPspsDb(logger, configDoc) 127 datastore = Datastore(logger, configDoc) 107 128 108 129 # check we connected ok … … 116 137 EPOCH = configDoc.find("options/epoch").text 117 138 PUBLISH = int(configDoc.find("options/publishToDatastore").text) 139 BASEPATH = configDoc.find("localOutPath").text 118 140 QUEUE_P2 = int(configDoc.find("options/queueP2").text) 119 141 QUEUE_ST = int(configDoc.find("options/queueST").text) … … 159 181 break; 160 182 183 # queue up batches that are processed but not loaded to datastore 184 if QUEUE_P2: publishAnyUnpublishedBatches("P2") 185 if QUEUE_ST: publishAnyUnpublishedBatches("ST") 186 161 187 if QUEUE_P2: queueItems("P2") 162 188 if QUEUE_ST: queueItems("ST")
Note:
See TracChangeset
for help on using the changeset viewer.
