Changeset 33160
- Timestamp:
- Jan 26, 2012, 12:23:08 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/scratchdb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/scratchdb.py
r33155 r33160 196 196 rs.first() 197 197 if rs.getInt(1) > 0: 198 self.logger. errorPair("Already imported up-to-date version of", path)198 self.logger.debugPair("Already imported up-to-date version of", path) 199 199 return True 200 200 else: … … 219 219 self.execute(sql) 220 220 221 ''' 222 Gets total size of DVO files imported to this database 223 Counts only cpm and cpt files 224 ''' 225 def getTotalSizeOfIngestedDvoFiles(self): 226 227 sql = "SELECT SUM(size) FROM " + self.dvoDoneTable + " where path LIKE '%cpm' OR path LIKE '%cpt'" 228 try: 229 rs = self.executeQuery(sql) 230 rs.first() 231 size = rs.getLong(1) 232 except: 233 self.logger.errorPair("Unable to get total ingested DVO size", sql) 234 235 return size 236 237 ''' 238 Checks whether DVO files we have ingested are form the DVO path provided 239 ''' 240 def isThisDvoCurrentlyIngested(self, path): 241 242 sql = "SELECT path FROM " + self.dvoDoneTable + " where path LIKE '%Images.dat'" 243 try: 244 rs = self.executeQuery(sql) 245 rs.first() 246 247 head,tail = os.path.split(rs.getString(1)) 248 249 if head == path: 250 self.logger.infoPair("Already ingested stuff from DVO at", path) 251 return True 252 else: 253 self.logger.errorPair("DVO does not match. We have", head) 254 return False 255 256 except: 257 self.logger.errorPair("No DVO files ingested for this path", path) 258 return False 259 221 260 ''' 222 261 Checks whether the astrometric solution is ok for this chip
Note:
See TracChangeset
for help on using the changeset viewer.
