Changeset 35402
- Timestamp:
- Apr 16, 2013, 6:27:02 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307/ippToPsps/jython
- Files:
-
- 9 edited
-
batch.py (modified) (4 diffs)
-
config.py (modified) (2 diffs)
-
datastore.py (modified) (1 diff)
-
detectionbatch.py (modified) (2 diffs)
-
dvo.py (modified) (1 diff)
-
dvoobjects.py (modified) (2 diffs)
-
loader.py (modified) (1 diff)
-
mysql.py (modified) (2 diffs)
-
scratchdb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/ippToPsps/jython/batch.py
r35352 r35402 276 276 p = Popen(cmd, shell=True, stdout=PIPE) 277 277 p.wait() 278 if p.returncode != 0: 279 self.logger.errorPair("error running xmllint for ", tmpPath) 280 raise 278 281 except: 279 282 self.logger.errorPair("Popen failed", cmd) … … 301 304 p = Popen(cmd, shell=True, stdout=PIPE) 302 305 p.wait() 303 304 306 if p.returncode != 0: 305 307 self.logger.errorPair("tar command", "failed") … … 311 313 p = Popen(cmd, shell=True, stdout=PIPE) 312 314 p.wait() 313 314 315 if p.returncode != 0: 315 316 self.logger.errorPair("gzip command", "failed") … … 519 520 p = Popen(cmd, shell=True, stdout=PIPE) 520 521 p.wait() 522 if p.returncode != 0: 523 self.logger.errorPair("dvograbber command", "failed") 524 return False 521 525 522 526 rowCount = self.scratchDb.getRowCount("dvoDetection") -
branches/eam_branches/ipp-20130307/ippToPsps/jython/config.py
r35352 r35402 66 66 self.czarPlotsPath = self.settingsDoc.find("czarPlotsPath").text 67 67 68 69 70 68 # print "config.programName: ", self.programName 71 69 # print "config.configDir: ", self.configDir … … 125 123 return self.settingsDoc.find(dbType +"/password").text 126 124 125 def getDbMemory(self, dbType): 126 if dbType == 'localdatabase' or dbType == 'localdatabase_test': 127 return self.scratchDbLeaf.find('memory').text 128 else: 129 print "memory is not a valid option for non-scratch databases..." 130 raise 131 127 132 def setScratchDbLeaf(self, myhost): 128 133 root = self.settingsDoc.getroot() -
branches/eam_branches/ipp-20130307/ippToPsps/jython/datastore.py
r35097 r35402 47 47 --list " + tempFile.name 48 48 49 print "dsreg cmd: ", command 49 50 p = Popen(command, shell=True, stdout=PIPE) 50 51 p.wait() -
branches/eam_branches/ipp-20130307/ippToPsps/jython/detectionbatch.py
r35369 r35402 909 909 return False 910 910 911 if self.populatePspsTablesChip("Chip", 0, 0, results, tables): otaCount = otaCount + 1912 913 if self.skipBatch:914 self.logger.error("fatal problem for exposure, skipping")915 return False911 if "Chip" in self.imageIDs: 912 if self.populatePspsTablesChip("Chip", 0, 0, results, tables): otaCount = otaCount + 1 913 if self.skipBatch: 914 self.logger.error("fatal problem for exposure, skipping") 915 return False 916 916 917 917 # print totals … … 926 926 self.logger.info("+-------+---------------+---------------+---------------+---------------+---------------+---------------+") 927 927 928 # if we only have one table export, i.e. FrameMeta, then get out of here 928 # if we only have one table export, i.e. FrameMeta, then get out of here (skip batch, but do not abort) 929 929 if len(self.tablesToExport) == 1: 930 930 self.skipBatch = True 931 931 self.logger.error("No tables to export") 932 932 return False -
branches/eam_branches/ipp-20130307/ippToPsps/jython/dvo.py
r35352 r35402 193 193 p = Popen(cmd, shell=True, stdout=PIPE) 194 194 p.wait() 195 if p.returncode != 0: 196 self.logger.errorPair("dvopsps failed on SkyTable.fits for ", self.skychunk.dvoLocation) 197 raise 195 198 196 199 self.logger.infoPair("Adding index to", self.scratchDb.dvoSkyTable) -
branches/eam_branches/ipp-20130307/ippToPsps/jython/dvoobjects.py
r35223 r35402 67 67 68 68 if self.skychunk.parallel: 69 if self.scratchDb.dbHost == "localhost": 70 self.logger.info("dvopsps objects -parallel is incompatible with localhost for scratchdb") 71 raise 72 69 73 cmd += " -parallel" 70 74 … … 72 76 p = Popen(cmd, shell=True, stdout=PIPE) 73 77 p.wait() 78 if p.returncode != 0: 79 self.logger.errorPair("dvopsps failed on ", region) 80 raise 74 81 75 82 # update lists after attempted sync -
branches/eam_branches/ipp-20130307/ippToPsps/jython/loader.py
r35352 r35402 198 198 # insertion 199 199 if not self.ippToPspsDb.isBoxIngested(boxId, self.scratchDb.dbHost): 200 self.dvoDetections.nativeIngestDetections(boxId, boxDim) 200 if not self.dvoDetections.nativeIngestDetections(boxId, boxDim): 201 self.logger.error("Unable to ingest detections with nativeIngest") 202 return False 201 203 202 204 useFullTables = 1 -
branches/eam_branches/ipp-20130307/ippToPsps/jython/mysql.py
r35352 r35402 55 55 rs.first() 56 56 fullVersion = rs.getString(1) 57 self.version = fullVersion[0:3] 57 majVersion = fullVersion[0:3] 58 self.version = float(majVersion) 58 59 59 60 except: … … 61 62 raise 62 63 63 # print "version number: ", self.version64 64 self.connected = True 65 65 -
branches/eam_branches/ipp-20130307/ippToPsps/jython/scratchdb.py
r35369 r35402 38 38 self.dvoSkyTable = "dvoSkyTable" 39 39 self.dvoPhotcodesTable = "dvoPhotcodes" 40 self.memoryTableSize = config.getDbMemory(dbType) 40 41 41 42 ''' … … 509 510 self.dropTable(self.dvoDetectionTable) 510 511 512 # we need a big enough memory table for the incoming detections 513 print "requested memory in gigs: ", self.memoryTableSize 514 tableSize = int(self.memoryTableSize) * 1024 * 1024 * 1024 515 sql = "set @@max_heap_table_size = " + str(tableSize) 516 print "setting max heap size: ", sql 517 try: self.execute(sql) 518 except: 519 self.logger.errorPair("Unable to set max MEMORY table size for ", self.dvoDetectionTable) 520 return False 521 511 522 # create detections table 512 523 self.logger.infoPair("Creating table", self.dvoDetectionTable)
Note:
See TracChangeset
for help on using the changeset viewer.
