Changeset 31720 for trunk/ippToPsps/jython/batch.py
- Timestamp:
- Jun 27, 2011, 4:25:39 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r31469 r31720 73 73 74 74 # open config 75 doc = ElementTree(file="config.xml")75 self.doc = ElementTree(file="config.xml") 76 76 77 77 if self.survey != "": … … 79 79 80 80 # get dvo info from config 81 dvoName = doc.find("dvo_" + self.survey + "/name").text82 self.dvoLocation = doc.find("dvo_" + self.survey + "/location").text81 dvoName = self.doc.find("dvo_" + self.survey + "/name").text 82 self.dvoLocation = self.doc.find("dvo_" + self.survey + "/location").text 83 83 else: 84 84 dvoName = "" 85 85 self.dvoLocation = "" 86 86 self.surveyID = -1; 87 87 88 # get some options from the config 89 self.dataRelease = self.doc.find("metadata/dataRelease").text 90 88 91 # get datastore info from config 89 92 self.datastore = Datastore(self.logger) … … 98 101 # get local storage location from config 99 102 self.batchName = "B%08d" % self.batchID 100 self.subDir = doc.find("localOutPath").text + "/" + self.getPspsBatchType() + "/" + dvoName103 self.subDir = self.doc.find("localOutPath").text + "/" + self.getPspsBatchType() + "/" + dvoName 101 104 self.localOutPath = self.subDir + "/" + self.batchName 102 105 if not os.path.exists(self.localOutPath): os.makedirs(self.localOutPath) … … 156 159 157 160 found = False 158 161 162 origIndex = file.tell() 159 163 while True: 160 164 … … 175 179 file.seek(index + 2880, 0) 176 180 177 if found != True: 181 if found != True: 182 183 file.seek(origIndex, 0) 178 184 self.logger.error("...could not read header in extension '" + name + "'") 179 185 return … … 238 244 def createTarball(self): 239 245 246 if self.doc.find("options/createTarball").text == "false": return 247 240 248 # set up filenams and paths 241 249 tarFile = self.batchName + ".tar" … … 263 271 ''' 264 272 def publishToDatastore(self): 273 274 if self.doc.find("options/publishToDatastore").text == "false": return 265 275 266 276 if self.datastore.publish(self.batchName, self.subDir, self.tarballFile, "tgz"): … … 462 472 def reportNullsInAllPspsTables(self, showPartials): 463 473 474 if self.doc.find("options/reportNulls").text == "false": return 475 464 476 for table in self.pspsTables: 465 477 self.scratchDb.reportNulls(table.name, showPartials) … … 515 527 516 528 self.createEmptyPspsTables() 517 self.importIppTables()529 #self.importIppTables() 518 530 if self.populatePspsTables(): 519 531 if self.exportPspsTablesToFits(): … … 521 533 self.createTarball() 522 534 self.publishToDatastore() 523 #self.reportNullsInAllPspsTables(False)535 self.reportNullsInAllPspsTables(False) 524 536 #sys.exit() 525 537 self.logger.info("Finished.")
Note:
See TracChangeset
for help on using the changeset viewer.
