Changeset 32467
- Timestamp:
- Sep 29, 2011, 3:31:08 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r32332 r32467 39 39 ippToPspsDb, 40 40 id, 41 batchID, 41 42 batchType, 42 43 fits): … … 60 61 # set up class variables 61 62 self.id = id 63 self.batchID = batchID 62 64 self.gpc1Db = gpc1Db 63 65 self.ippToPspsDb = ippToPspsDb … … 88 90 89 91 # create datastore object 90 self.datastore = Datastore(self.logger, self.doc )92 self.datastore = Datastore(self.logger, self.doc, self.ippToPspsDb) 91 93 92 94 # create a new batch 93 self.batchID = self.ippToPspsDb.createNewBatch(94 self.batchType,95 self.id,96 self.survey,97 self.dvoGpc1Label,98 self.datastore.product)95 #self.batchID = self.ippToPspsDb.createNewBatch( 96 # self.batchType, 97 # self.id, 98 # self.survey, 99 # self.dvoGpc1Label, 100 # self.datastore.product) 99 101 100 102 # get local storage location from config … … 247 249 248 250 outPath = self.localOutPath + "/BatchManifest.xml" 249 tmpPath = "./tmp.xml"251 tmpPath = self.localOutPath + "/tmp.xml" 250 252 self.logger.infoPair("Creating manifest", outPath) 251 253 root = Element('manifest') … … 316 318 317 319 # now publish to the datastore 318 Batch.publishToDatastore(self.datastore, self. ippToPspsDb, self.batchID, self.batchName, self.subDir, tarballFile)320 Batch.publishToDatastore(self.datastore, self.batchID, self.batchName, self.subDir, tarballFile) 319 321 320 322 ''' … … 322 324 ''' 323 325 @staticmethod 324 def publishToDatastore(datastore, ippToPspsDb, batchID, batchName, subDir, tarballFile): 325 326 if datastore.publish(batchName, subDir, tarballFile, "tgz"): 327 ippToPspsDb.updateLoadedToDatastore(batchID, 1) 328 else: 329 ippToPspsDb.updateLoadedToDatastore(batchID, -1) 330 326 def publishToDatastore(datastore, batchID, batchName, subDir, tarballFile): 327 datastore.publish(batchName, subDir, tarballFile, "tgz") 331 328 332 329 '''
Note:
See TracChangeset
for help on using the changeset viewer.
