Changeset 38358 for trunk/ippToPsps/jython/diffbatch.py
- Timestamp:
- Jun 3, 2015, 11:23:52 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/diffbatch.py (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/diffbatch.py
r37935 r38358 41 41 ippToPspsDb, 42 42 scratchDb, 43 diffSkyFileID,43 stageid, 44 44 batchID): 45 45 … … 51 51 ippToPspsDb, 52 52 scratchDb, 53 diffSkyFileID,53 stageid, 54 54 batchID, 55 55 "DF", … … 59 59 # get diff meta data 60 60 # if error about catID you are usings an old ipptopsps_scratch db 61 self.logger.infoPair("getting diff" ," metadata") 62 meta = self.gpc1Db.getDiffStageMeta(diffSkyFileID) 63 self.logger.infoPair("ok, I guess that worked","now doing this") 64 self.diffSkyFileID = diffSkyFileID 65 if not meta: 66 self.logger.errorPair("Could not get", "diff metadata") 67 raise 68 self.logger.infoPair("so meta", "much amaze") 69 self.filterName = meta[0]; 70 self.difftypeID = meta[1]; 71 self.posImageID = meta[2]; 72 self.negImageID = meta[3]; 73 self.skycellName = meta[4]; 74 self.analVer = meta[5]; 75 self.expTime = meta[6]; 76 self.obsTime = meta[7]; 77 self.fits = gpc1Db.getDiffStageCmf(skychunk.dvoLabel, diffSkyFileID) 78 self.header = self.fits.getPrimaryHeader() 79 tessName = self.getKeyValue(self.header, 'TESS_ID') 80 self.tessID = self.scratchDb.getTessID(tessName) 81 82 61 62 # initialize list variables here 63 64 65 self.header ={} 66 self.diffSkyFileIDs = {} 67 self.filterName = {} 68 self.filterID = {} 69 self.photoCalID = {} 70 self.difftypeID = {} 71 self.posImageID = {} 72 self.negImageID = {} 73 self.skycellName = {} 74 self.analVer = {} 75 self.expTime = {} 76 self.obsTime = {} 77 self.fits = {} 78 self.tessID = {} 79 self.tessName = {} 80 self.skycellID = {} 81 self.projectionID ={} 82 83 # number is special - it is simply a list of diff skyfile IDs, used for 84 # looping over things 85 self.stageid = stageid 86 self.number = {} 87 num = 0 88 89 # grab list of diffs from stage id 90 91 self.diffSkyFileIDs = gpc1Db.getListOfDiffSkyFileIdsForDiffBatch(skychunk.dvoLabel, stageid) 92 93 # loop over diffs 94 95 for diffSkyFileID in self.diffSkyFileIDs: 96 self.number[num]= diffSkyFileID 97 98 99 100 self.logger.infoPair("getting diff" ," metadata") 101 self.logger.infoPair("for diff skyfile id ", str(diffSkyFileID)) 102 meta = {} 103 meta = self.gpc1Db.getDiffStageMeta(int(diffSkyFileID)) 104 self.logger.infoPair("ok, I guess that worked","now doing this") 105 106 if not meta: 107 self.logger.errorPair("Could not get", "diff metadata") 108 raise 109 self.logger.infoPair("so meta", "much amaze") 110 self.filterName[num] = meta[0]; 111 112 self.difftypeID[num] = meta[1]; 113 self.posImageID[num] = meta[2]; 114 self.negImageID[num] = meta[3]; 115 self.skycellName[num] = meta[4]; 116 self.analVer[num] = meta[5]; 117 self.expTime[num] = meta[6]; 118 self.obsTime[num] = meta[7]; 119 self.logger.infoPair("loading diff stage cmf", diffSkyFileID) 120 self.fits[num] = gpc1Db.getDiffStageCmf(skychunk.dvoLabel, int(diffSkyFileID)) 121 self.logger.infoPair("loading diff stage header", diffSkyFileID) 122 self.header[num] = self.fits[num].getPrimaryHeader() 123 # tessName = None 124 # tessName = self.getKeyValue(self.header[num], 'TESS_ID') 125 self.tessName[num]= meta[8]; 126 tessName = self.tessName[num] 127 self.logger.infoPair("TessName ",tessName) 128 self.tessID[num] = self.scratchDb.getTessID(tessName) 129 130 self.logger.infoPair("TessName ",tessName) 83 131 # XXX EAM 20140812 : I am hardwiring the parsing logic for RINGS vs LOCAL 84 if tessName== 'RINGS.V3':132 if self.tessName[num] == 'RINGS.V3': 85 133 # skycell is, eg "skycell.1133.081" 86 134 # 0123456789012345 87 self.projectionID = self.skycellName[8:12]88 self.skycellID = self.skycellName[13:]89 self.skycellID = self.skycellName[8:]90 else:135 self.projectionID[num] = self.skycellName[num][8:12] 136 self.skycellID[num] = self.skycellName[num][13:] 137 self.skycellID[num] = self.skycellName[num][8:] 138 else: 91 139 # skycell is, eg "skycell.081" 92 140 # 01234567890 93 self.projectionID= 094 self.skycellID = self.skycellName[8:11]95 self.skycellID=self.skycellName[8:]96 if self.skycellID== "":97 self.skycellID= -1141 self.projectionID[num] = 0 142 self.skycellID[num] = self.skycellName[num][8:11] 143 self.skycellID[num]=self.skycellName[num][8:] 144 if self.skycellID[num] == "": 145 self.skycellID[num] = -1 98 146 99 147 100 148 # drop the existing tables 101 149 102 self.dropTableVerbose("DiffMeta") 103 self.dropTableVerbose("DiffToImage") 104 self.dropTableVerbose("DiffDetection") 105 150 self.dropTableVerbose("DiffMeta_"+str(num)) 151 self.dropTableVerbose("DiffToImage_"+str(num)) 152 self.dropTableVerbose("DiffDetection_"+str(num)) 153 154 if not self.analVer[num]: self.analVer[num] = -999 155 self.logger.infoPair("getPhotoCalID",diffSkyFileID) 156 self.photoCalID[num] = str(self.scratchDb.getPhotoCalID(int(diffSkyFileID))) 157 self.logger.infoPair("get filterID", diffSkyFileID) 158 self.filterID[num] = self.scratchDb.getFilterID(self.filterName[num][0]) 159 self.logger.infoPair("insertdiffmeta", diffSkyFileID) 160 self.logger.infoPair("insertdiffmeta", self.filterName[num][0]) 161 self.logger.infoPair("insertdiffmeta", self.difftypeID[num]) 162 self.ippToPspsDb.insertDiffMeta(self.batchID, self.filterName[num][0], self.difftypeID[num]) 163 164 # make some generic tables 165 sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta" 166 try: self.scratchDb.execute(sql) 167 except: raise 168 sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage" 169 try: self.scratchDb.execute(sql) 170 except: raise 171 sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection" 172 try: self.scratchDb.execute(sql) 173 except: raise 174 175 176 177 num = num + 1 178 179 # create an output filename, which is {expID}.FITS 180 181 182 self.outputFitsFile = "%08d.FITS" % self.stageid 183 self.outputFitsPath = "%s/%s" % (self.localOutPath, self.outputFitsFile) 106 184 107 108 109 self.logger.infoPair("I can haz",diffSkyFileID) 110 111 112 113 if not self.analVer: self.analVer = -999 114 115 # create an output filename, which is {expID}.FITS 116 self.outputFitsFile = "%08d.FITS" % self.diffSkyFileID 117 self.outputFitsPath = "%s/%s" % (self.localOutPath, self.outputFitsFile) 118 print "got here" 119 self.photoCalID = str(self.scratchDb.getPhotoCalID(self.diffSkyFileID)) 120 print "got photocalid" 185 186 121 187 self.calibModNum = 0; 122 188 self.dataRelease = skychunk.dataRelease; 123 189 124 self.filterID = self.scratchDb.getFilterID(self.filterName[0])125 126 print self.filterName127 print self.filterName[0]128 print self.filterID129 # insert what we know about this stack batch into the stack table130 self.ippToPspsDb.insertDiffMeta(self.batchID, self.filterName[0], self.difftypeID)131 190 132 191 # dump stuff to log 133 self.logger.infoPair(" diff_skyfile_ID", "%d" % self.diffSkyFileID)192 self.logger.infoPair("stage_id", "%d" % self.stageid) 134 193 135 194 … … 137 196 Populates the FrameMeta table, mainly from dictionary values found in IPP FITS header 138 197 ''' 139 def populateDiffMeta(self): 140 self.logger.infoPair("Proccesing table", "DiffMeta") 141 142 sqlLine = sqlUtility("INSERT INTO DiffMeta (") 143 144 sqlLine.group("diffMetaID", str(self.diffSkyFileID)); 145 sqlLine.group("difftypeID", self.difftypeID); 146 sqlLine.group("posImageID", self.posImageID); 147 sqlLine.group("negImageID", self.negImageID); 148 sqlLine.group("skycellID", self.skycellID); 149 sqlLine.group("photoCalID", self.photoCalID); 150 sqlLine.group("magSat", self.getKeyFloat(self.header, "%.8f", 'FSATUR')); 151 sqlLine.group("analVer", str(self.analVer)); 152 sqlLine.group("expTime", self.expTime); 153 sqlLine.group("ctype1", self.getKeyValue(self.header, 'CTYPE1')); 154 sqlLine.group("ctype2", self.getKeyValue(self.header, 'CTYPE2')); 155 sqlLine.group("crval1", self.getKeyFloat(self.header, "%.8f", 'CRVAL1')); 156 sqlLine.group("crval2", self.getKeyFloat(self.header, "%.8f", 'CRVAL2')); 157 sqlLine.group("crpix1", self.getKeyFloat(self.header, "%.8f", 'CRPIX1')); 158 sqlLine.group("crpix2", self.getKeyFloat(self.header, "%.8f", 'CRPIX2')); 159 sqlLine.group("cdelt1", self.getKeyFloat(self.header, "%.8e", 'CDELT1')); 160 sqlLine.group("cdelt2", self.getKeyFloat(self.header, "%.8e", 'CDELT2')); 161 sqlLine.group("pc001001", self.getKeyFloat(self.header, "%.8e", 'PC001001')); 162 sqlLine.group("pc001002", self.getKeyFloat(self.header, "%.8e", 'PC001002')); 163 sqlLine.group("pc002001", self.getKeyFloat(self.header, "%.8e", 'PC002001')); 164 sqlLine.group("pc002002", self.getKeyFloat(self.header, "%.8e", 'PC002002')); 198 def populateDiffMeta(self,num): 199 diffSkyFileID = self.number[num] 200 self.logger.infoPair("Proccesing table", "DiffMeta_"+str(num)) 201 202 sqlLine = sqlUtility("INSERT INTO DiffMeta_"+str(num)+" (") 203 204 sqlLine.group("diffMetaID", str(diffSkyFileID)); 205 sqlLine.group("difftypeID", self.difftypeID[num]); 206 sqlLine.group("posImageID", self.posImageID[num]); 207 sqlLine.group("negImageID", self.negImageID[num]); 208 sqlLine.group("skycellID", self.skycellID[num]); 209 sqlLine.group("photoCalID", self.photoCalID[num]); 210 sqlLine.group("magSat", self.getKeyFloat(self.header[num], "%.8f", 'FSATUR')); 211 sqlLine.group("analVer", str(self.analVer[num])); 212 sqlLine.group("expTime", self.expTime[num]); 213 sqlLine.group("ctype1", self.getKeyValue(self.header[num], 'CTYPE1')); 214 sqlLine.group("ctype2", self.getKeyValue(self.header[num], 'CTYPE2')); 215 sqlLine.group("crval1", self.getKeyFloat(self.header[num], "%.8f", 'CRVAL1')); 216 sqlLine.group("crval2", self.getKeyFloat(self.header[num], "%.8f", 'CRVAL2')); 217 sqlLine.group("crpix1", self.getKeyFloat(self.header[num], "%.8f", 'CRPIX1')); 218 sqlLine.group("crpix2", self.getKeyFloat(self.header[num], "%.8f", 'CRPIX2')); 219 sqlLine.group("cdelt1", self.getKeyFloat(self.header[num], "%.8e", 'CDELT1')); 220 sqlLine.group("cdelt2", self.getKeyFloat(self.header[num], "%.8e", 'CDELT2')); 221 sqlLine.group("pc001001", self.getKeyFloat(self.header[num], "%.8e", 'PC001001')); 222 sqlLine.group("pc001002", self.getKeyFloat(self.header[num], "%.8e", 'PC001002')); 223 sqlLine.group("pc002001", self.getKeyFloat(self.header[num], "%.8e", 'PC002001')); 224 sqlLine.group("pc002002", self.getKeyFloat(self.header[num], "%.8e", 'PC002002')); 165 225 166 226 sql = sqlLine.make(") VALUES ( ", ")") … … 170 230 self.logger.errorPair('failed sql: ', sql) 171 231 raise 172 self.logger.infoPair("DiffMeta ","final stuff")173 self.scratchDb.updateAllRows("DiffMeta ", "batchID", str(self.batchID))174 self.scratchDb.updateAllRows("DiffMeta ", "surveyID", str(self.surveyID))175 self.scratchDb.updateFilterID("DiffMeta ", self.filterName[0])176 self.scratchDb.updateAllRows("DiffMeta ", "calibModNum", str(self.calibModNum))177 self.scratchDb.updateAllRows("DiffMeta ", "dataRelease", str(self.skychunk.dataRelease))178 self.logger.infoPair("DiffMeta ","done")232 self.logger.infoPair("DiffMeta_"+str(num),"final stuff") 233 self.scratchDb.updateAllRows("DiffMeta_"+str(num), "batchID", str(self.batchID)) 234 self.scratchDb.updateAllRows("DiffMeta_"+str(num), "surveyID", str(self.surveyID)) 235 self.scratchDb.updateFilterID("DiffMeta_"+str(num), self.filterName[num][0]) 236 self.scratchDb.updateAllRows("DiffMeta_"+str(num), "calibModNum", str(self.calibModNum)) 237 self.scratchDb.updateAllRows("DiffMeta_"+str(num), "dataRelease", str(self.skychunk.dataRelease)) 238 self.logger.infoPair("DiffMeta_"+str(num),"done") 179 239 180 240 ''' 181 241 Populates the Diff table for this OTA 182 242 ''' 183 def populateDiffDetectionTable(self ):184 185 pspsTableName = "DiffDetection "186 ippTableName = "SkyChip_psf "187 243 def populateDiffDetectionTable(self,num): 244 245 pspsTableName = "DiffDetection_"+str(num) 246 ippTableName = "SkyChip_psf_"+str(num) 247 diffSkyFileID = self.number[num] 188 248 #results['ORIGINALTOTAL'] = self.scratchDb.getRowCount(ippTableName) 189 249 … … 200 260 #results['SATDET'] = 0 201 261 202 extTimeString = str(self.expTime )262 extTimeString = str(self.expTime[num]) 203 263 204 264 # insert all detections into table : do NOT include the IGNORE unless we have to … … 210 270 211 271 sqlLine.group("ippDetectID", "IPP_IDET") 212 sqlLine.group("diffDetMetaID", str( self.diffSkyFileID));272 sqlLine.group("diffDetMetaID", str(diffSkyFileID)); 213 273 sqlLine.group("randomDiffID", "FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)") 214 sqlLine.group("filterID", str(self.filterID ))274 sqlLine.group("filterID", str(self.filterID[num])) 215 275 sqlLine.group("surveyID", str(self.surveyID)) 216 sqlLine.group("skycellID", str(self.skycellID ))276 sqlLine.group("skycellID", str(self.skycellID[num])) 217 277 ## sqlLine.group("obsTime", str(self.obsTime)) 218 sqlLine.group("expTime", str(self.expTime ))219 sqlLine.group("obsTime", str(self.obsTime ))278 sqlLine.group("expTime", str(self.expTime[num])) 279 sqlLine.group("obsTime", str(self.obsTime[num])) 220 280 sqlLine.group("xPos", "X_PSF") 221 281 sqlLine.group("yPos", "Y_PSF") … … 302 362 # insert stuff from dvo 303 363 self.logger.infoPair("inserting dvo info:find imageID"," from externID") 304 imageID = self.scratchDb.getImageIDFromExternID( self.diffSkyFileID)305 self.logger.infoPair("updating","diffdetection ")306 sqlLine = sqlUtility("UPDATE DiffDetection as a, " + self.scratchDb.dvoDetectionTable + " as b SET ")364 imageID = self.scratchDb.getImageIDFromExternID(diffSkyFileID) 365 self.logger.infoPair("updating","diffdetection_"+str(num)) 366 sqlLine = sqlUtility("UPDATE DiffDetection_"+str(num)+" as a, " + self.scratchDb.dvoDetectionTable + " as b SET ") 307 367 sqlLine.group("a.diffObjID", "b.objId") 308 368 sqlLine.group("a.diffDetID", "b.detectID") … … 326 386 raise 327 387 self.logger.infoPair("need to cull"," nulls objid") 328 results= self.scratchDb.reportAndDeleteRowsWithNULLS("DiffDetection ", "diffObjID")329 self.logger.infoPair("Adding 'row' columns to", "DiffDetection tables")388 results= self.scratchDb.reportAndDeleteRowsWithNULLS("DiffDetection_"+str(num), "diffObjID") 389 self.logger.infoPair("Adding 'row' columns to", "DiffDetection_"+str(num)) 330 390 # diff has a primary key, so use this instead 331 self.scratchDb.addRowCountColumnNoKey("DiffDetection ", "row")391 self.scratchDb.addRowCountColumnNoKey("DiffDetection_"+str(num), "row") 332 392 self.logger.infoPair("adding","uniquePSPSDFid") 333 self.updatePspsUniqueIDs("DiffDetection ")393 self.updatePspsUniqueIDs("DiffDetection_"+str(num),num) 334 394 self.logger.infoPair("Dropping row column from", "DiffDetection table") 335 self.scratchDb.dropColumn("DiffDetection ", "row")395 self.scratchDb.dropColumn("DiffDetection_"+str(num), "row") 336 396 337 397 … … 339 399 Populates the DiffToImage table 340 400 ''' 341 def populateDiffToImage(self ):342 401 def populateDiffToImage(self,num): 402 diffSkyFileID = self.number[num] 343 403 self.logger.infoPair("Procesing table", "DiffToImage") 344 404 345 imageIDs = self.gpc1Db.getImageIDsForThisDiffID( self.diffSkyFileID)405 imageIDs = self.gpc1Db.getImageIDsForThisDiffID(int(diffSkyFileID)) 346 406 347 407 for imageID in imageIDs: 348 408 349 sql = "INSERT INTO DiffToImage (diffMetaID, imageID) \409 sql = "INSERT INTO DiffToImage_"+str(num)+" (diffMetaID, imageID) \ 350 410 VALUES (\ 351 " + str( self.diffSkyFileID) + ", " + imageID + ")"411 " + str(diffSkyFileID) + ", " + imageID + ")" 352 412 self.scratchDb.execute(sql) 353 413 … … 368 428 ''' 369 429 def alterPspsTables(self): 370 430 371 431 self.logger.debug("Altering PSPS tables") 372 432 self.logger.debug("Creating indexes on PSPS tables") … … 382 442 # loop through all OTAs and populate ImageMeta extensions 383 443 # the column in PSPS 384 self.scratchDb.execute("ALTER TABLE DiffDetection CHANGE dec_ `dec` double")444 self.scratchDb.execute("ALTER TABLE DiffDetection"+" CHANGE dec_ `dec` double") 385 445 386 446 return True … … 390 450 Applies indexes to the IPP tables 391 451 ''' 392 def indexIppTables(self ):452 def indexIppTables(self,num): 393 453 394 454 self.logger.infoPair("Creating indexes on", "IPP tables") … … 396 456 #self.scratchDb.createIndex(extension, "IPP_IDET") 397 457 # try the test Chip 398 self.scratchDb.createIndex("SkyChip_psf ", "IPP_IDET")458 self.scratchDb.createIndex("SkyChip_psf_"+str(num), "IPP_IDET") 399 459 400 460 self.logger.infoPair("created indexes on", "IPP tables") … … 431 491 ''' 432 492 433 def updatePspsUniqueIDs(self,table ):493 def updatePspsUniqueIDs(self,table,num): 434 494 #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \ 435 495 #(select @r:=0) r, "+table+" t) as foo using (diffobjID) set \ 436 496 #uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)" 437 sql = "UPDATE DiffDetection set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) +row)"497 sql = "UPDATE DiffDetection_"+str(num)+" set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) + ("+str(num)+"*1000000)+ row)" 438 498 try: self.scratchDb.execute(sql) 439 499 except: … … 452 512 # loop through all OTAs again to update with DVO IDs 453 513 self.skipBatch = False 454 self.tablesToExport = [] 455 self.tablesToExport.append("DiffMeta") 456 self.populateDiffMeta() 457 self.logger.infoPair("populated","DiffMeta") 458 self.tablesToExport.append("DiffToImage") 459 self.populateDiffToImage() 460 self.logger.infoPair("populated","DiffToImage") 461 self.tablesToExport.append("DiffDetection") 462 self.populateDiffDetectionTable() 463 self.logger.infoPair("populated","DiffDetection") 464 465 466 467 468 self.setMinMaxDiffObjID(["DiffDetection"]) 514 self.tablesToExport = [] 515 for num in self.number: 516 517 self.tablesToExport.append("DiffMeta_"+str(num)) 518 self.populateDiffMeta(num) 519 self.logger.infoPair("populated","DiffMeta_"+str(num)) 520 self.tablesToExport.append("DiffToImage_"+str(num)) 521 self.populateDiffToImage(num) 522 self.logger.infoPair("populated","DiffToImage_"+str(num)) 523 self.tablesToExport.append("DiffDetection_"+str(num)) 524 self.populateDiffDetectionTable(num) 525 self.logger.infoPair("populated","DiffDetection_"+str(num)) 526 self.setMinMaxDiffObjID(["DiffDetection_"+str(num)]) 469 527 470 528 … … 487 545 488 546 count = 0 489 fileName = self.fits.getPath() 547 for num in self.number: 548 diffSkyFileID = self.number[num] 549 fileName = self.fits[num].getPath() 490 550 491 self.logger.infoPair("using filename:",fileName)492 493 try:494 tables = stilts.treads(fileName)495 except:496 self.logger.errorPair("STILTS could not import from", fileName)497 return False551 self.logger.infoPair("using filename:",fileName) 552 553 try: 554 tables = stilts.treads(fileName) 555 except: 556 self.logger.errorPair("STILTS could not import from", fileName) 557 return False 498 558 499 559 # count = 0 500 for table in tables:560 for table in tables: 501 561 502 match = re.match(tableRE, table.name)503 if not match: continue504 505 self.logger.infoPair("Reading IPP table", table.name)506 table = stilts.tpipe(table, cmd='addcol table_index $0')507 table = stilts.tpipe(table, cmd='explodeall')562 match = re.match(tableRE, table.name) 563 if not match: continue 564 565 self.logger.infoPair("Reading IPP table", table.name+"_"+str(num)) 566 table = stilts.tpipe(table, cmd='addcol table_index $0') 567 table = stilts.tpipe(table, cmd='explodeall') 508 568 509 569 # drop any previous tables before import 510 self.scratchDb.dropTable(table.name)570 self.scratchDb.dropTable(table.name+"_"+str(num)) 511 571 512 572 513 573 # IPP FITS files are littered with infinities, so remove these 514 self.logger.info("Removing Infinity values from all columns")515 table = stilts.tpipe(table, cmd='keepcols "' + columns + '"')516 table = stilts.tpipe(table, cmd='replaceval -Infinity null *')517 table = stilts.tpipe(table, cmd='replaceval Infinity null *')574 self.logger.info("Removing Infinity values from all columns") 575 table = stilts.tpipe(table, cmd='keepcols "' + columns + '"') 576 table = stilts.tpipe(table, cmd='replaceval -Infinity null *') 577 table = stilts.tpipe(table, cmd='replaceval Infinity null *') 518 578 519 try:520 table.write(self.scratchDb.url + '#' + table.name)521 count = count + 1522 except:523 self.logger.exception("Problem writing table '" + table.name+ "' to the database")579 try: 580 table.write(self.scratchDb.url + '#' + table.name+"_"+str(num)) 581 count = count + 1 582 except: 583 self.logger.exception("Problem writing table '" + table.name+"_"+str(num) + "' to the database") 524 584 525 self.logger.infoPair("Done. Imported", "%d tables" % count)526 self.indexIppTables()585 self.logger.infoPair("Done. Imported", "%d tables" % count) 586 self.indexIppTables(num) 527 587 528 588 return True
Note:
See TracChangeset
for help on using the changeset viewer.
