Changeset 33598
- Timestamp:
- Mar 23, 2012, 9:38:44 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/dvo.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/dvo.py
r33553 r33598 51 51 self.scratchDb.setUseFullTables(True) 52 52 53 self.checkDvoLocation()54 55 '''56 Checks whether scratch Db is using DVO Db specified in the config57 '''58 def checkDvoLocation(self):59 60 53 # decide if we are using the right DVO for this scratchDb 61 54 self.correctDvo = self.scratchDb.isCorrectDvo(self.config.dvoLocation) … … 115 108 self.logger.infoPair("DVO Images.dat file", "NOT up-to-date") 116 109 117 # first, delete old dvoMeta table118 #self.logger.infoPair("Deleting from table", self.scratchDb.dvoMetaTable)119 #sql = "DELETE FROM " + self.scratchDb.dvoMetaTable120 #self.scratchDb.execute(sql)121 #self.scratchDb.optimizeTable(self.scratchDb.dvoMetaTable)122 123 110 self.importFits( 124 111 path, … … 127 114 self.logger.infoPair("Adding primary key to", self.scratchDb.dvoImagesTable) 128 115 self.scratchDb.execute("ALTER TABLE " + self.scratchDb.dvoImagesTable + " ADD PRIMARY KEY (IMAGE_ID, EXTERN_ID)") 129 130 # insert into dvoMetaFull131 # NB what we and smf files call IMAGE_ID, DVO calls EXTERN_ID. We are sticking132 # with the smf name133 '''134 self.logger.infoPair("Populating", "all image meta data")135 sql = "INSERT INTO " + self.scratchDb.dvoMetaTable + " ( \136 imageID, \137 externID, \138 flags, \139 photcode \140 ) SELECT \141 IMAGE_ID, \142 EXTERN_ID, \143 FLAGS, \144 PHOTCODE \145 FROM " + self.scratchDb.dvoImagesTable146 147 try:148 self.scratchDb.execute(sql)149 except:150 self.logger.errorPair("Could not insert into", self.scratchDb.dvoMetaTable)151 return152 '''153 116 154 117 self.scratchDb.setImportedThisDvoTable(path)
Note:
See TracChangeset
for help on using the changeset viewer.
