Changeset 32065 for trunk/ippToPsps
- Timestamp:
- Aug 9, 2011, 4:18:54 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/batch.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/batch.py
r32033 r32065 41 41 id, 42 42 batchType, 43 fits, 44 survey=""): 43 fits): 45 44 46 45 self.everythingOK = False … … 62 61 self.batchType = batchType; 63 62 self.pspsVoTableFilePath = "../config/" + batchType + "/tables.vot" 64 self.survey = survey 65 66 # get dvo info from config67 dvoName = self.doc.find("dvo/name").text63 64 # get info from config 65 self.survey = self.doc.find("options/survey").text 66 self.pspsSurvey = self.doc.find("options/pspsSurvey").text 68 67 dvoGpc1Label = self.doc.find("dvo/gpc1Label").text 69 68 self.dvoLocation = self.doc.find("dvo/location").text … … 93 92 self.batchType, 94 93 self.id, 95 s urvey,94 self.survey, 96 95 dvoGpc1Label, 97 96 self.datastore.product) … … 99 98 # get local storage location from config 100 99 self.batchName = "B%08d" % self.batchID 101 self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvo Name100 self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvoGpc1Label 102 101 self.localOutPath = self.subDir + "/" + self.batchName 103 102 if not os.path.exists(self.localOutPath): os.makedirs(self.localOutPath) … … 115 114 self.logger.infoPair("Survey", self.survey) 116 115 self.logger.infoPair("Survey ID", "%d" % self.surveyID) 116 self.logger.infoPair("Publishing to PSPS as survey", self.pspsSurvey) 117 117 self.logger.infoPair("DVO location", self.dvoLocation) 118 self.logger.info Pair("Use full DVO tables?", "%d" %self.useFullTables)118 self.logger.infoBool("Use full DVO tables?", self.useFullTables) 119 119 120 120 if self.fits: … … 172 172 root.attrib['type'] = self.batchType 173 173 root.attrib['timestamp'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") 174 if self.survey != "": 175 root.attrib['survey'] = self.getBatchFriendlySurveyType() 174 if self.batchType != "IN": root.attrib['survey'] = self.pspsSurvey 176 175 try: self.minObjID 177 176 except: pass … … 237 236 if self.datastore.publish(self.batchName, self.subDir, tarballFile, "tgz"): 238 237 self.ippToPspsDb.updateLoadedToDatastore(self.batchID, 1) 239 240 '''241 Gets PSPS-friendly survey type242 '''243 def getBatchFriendlySurveyType(self):244 245 #return "SCR" # TODO246 try:247 self.survey248 except:249 return "NA"250 251 if self.survey == "3PI": return "3PI"252 elif self.survey == "MD04": return "MD4"253 else:254 self.logger.error("Don't know this survey: '" + self.survey + "'")255 return "NA"256 238 257 239 '''
Note:
See TracChangeset
for help on using the changeset viewer.
