Changeset 38837 for trunk/ippToPsps/jython/dvo.py
- Timestamp:
- Oct 10, 2015, 12:40:44 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/dvo.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/dvo.py
r38365 r38837 167 167 return False 168 168 169 self.logger.infoSeparator() 170 self.logger.infoPair("DVO SkyTable.fits file", "NOT up-to-date") 171 172 # drop dvoSkyTable (if it exists) 173 sql = "drop TABLE dvoSkyTable" 174 try: self.scratchDb.execute(sql) 175 except: pass 169 # self.logger.infoSeparator() 170 # self.logger.infoPair("DVO SkyTable.fits file", "NOT up-to-date") 171 # print "--- go" 172 173 self.scratchDb.dropTable("dvoSkyTable") 176 174 177 175 # create dvoSkyTable 178 sql = "CREATE TABLE dvoSkyTable (R_MIN REAL, R_MAX REAL, D_MIN REAL, D_MAX REAL, INDEX_INT, NAME CHAR(18))"176 sql = "CREATE TABLE dvoSkyTable (R_MIN REAL, R_MAX REAL, D_MIN REAL, D_MAX REAL, REGION_ID INT, NAME CHAR(18))" 179 177 self.scratchDb.execute(sql) 180 178 … … 196 194 self.logger.infoPair("Adding index to", self.scratchDb.dvoSkyTable) 197 195 198 self.scratchDb.createIndex(self.scratchDb.dvoSkyTable, " INDEX")196 self.scratchDb.createIndex(self.scratchDb.dvoSkyTable, "REGION_ID") 199 197 200 198 self.scratchDb.setImportedThisDvoTable(path) … … 580 578 self.ippToPspsDb.clearIngestedBoxes(self.scratchDb.dbHost) 581 579 582 if True: 583 print "*******************************************************************************" 580 if False: 584 581 self.logger.warning("about to delete detection table and re-ingest; is this correct?") 585 #response = raw_input("(y/n) ")586 #if response != "y":587 #raise588 #self.logger.warning("Are you ABSOLUTELY sure you want to do this?")589 #response = raw_input("(y/n) ")590 #if response != "y":591 #raise582 response = raw_input("(y/n) ") 583 if response != "y": 584 raise 585 self.logger.warning("Are you ABSOLUTELY sure you want to do this?") 586 response = raw_input("(y/n) ") 587 if response != "y": 588 raise 592 589 593 590 # blow away existing dvoDetection table & re-crate
Note:
See TracChangeset
for help on using the changeset viewer.
