IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2013, 4:35:54 PM (13 years ago)
Author:
eugene
Message:

use MEMORY engine for dvoDetectionFull; add error handline for dvopsps; check mysql version; remove some test verbosity; check for image existence in dvoImages; skip bad batches but do not exit; fix precision issues; add -realgpc option (part of -test mode); log times in milliseconds

Location:
trunk/ippToPsps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps

  • trunk/ippToPsps/jython/dvo.py

    r35223 r35417  
    193193            p = Popen(cmd, shell=True, stdout=PIPE)
    194194            p.wait()
     195            if p.returncode != 0:
     196                self.logger.errorPair("dvopsps failed on SkyTable.fits for ", self.skychunk.dvoLocation)
     197                raise
    195198
    196199        self.logger.infoPair("Adding index to", self.scratchDb.dvoSkyTable)
     
    591594    def nativeIngestDetections(self, boxId, boxDim):
    592595
    593         # XXX put the chunk below in a separate method
    594         # blow away existing dvoDetection table
    595 
    596596        # clear the 'ingested' field for all boxes owned by this host
    597597        self.ippToPspsDb.clearIngestedBoxes(self.scratchDb.dbHost)
     
    607607        ##     raise
    608608
    609         # drop detections table
    610         self.logger.infoPair("Dropping table", self.scratchDb.dvoDetectionTable)
    611         self.scratchDb.dropTable(self.scratchDb.dvoDetectionTable)
    612        
    613         # create detections table
    614         self.logger.infoPair("Creating table", self.scratchDb.dvoDetectionTable)
    615         sql = "CREATE TABLE " + self.scratchDb.dvoDetectionTable + " LIKE dvoDetection"
    616         try: self.scratchDb.execute(sql)
    617         except:
    618             self.logger.errorPair("Unable to create table", self.scratchDb.dvoDetectionTable)
     609        # blow away existing dvoDetection table & re-crate
     610        if not self.scratchDb.resetDvoDetectionTable():
     611            self.logger.errorPair("Unable to reset scratch table", "DvoDetectionFull")
    619612            return False
    620         self.scratchDb.changeEngineToInnoDB(self.scratchDb.dvoDetectionTable)
    621        
    622         # add fileID column
    623         sql = "ALTER TABLE " + self.scratchDb.dvoDetectionTable + " ADD fileID INT NOT NULL"
    624         try: self.scratchDb.execute(sql)
    625         except:
    626             self.logger.errorPair("Unable to add fileID column to ", self.scratchDb.dvoDetectionTable)
    627             return False
    628 
    629         # add an index to the fileID column
    630         self.scratchDb.createIndex(self.scratchDb.dvoDetectionTable, "fileID")
    631613
    632614        # make sure we have an up-to-date Images table
     
    665647        p = Popen(cmd, shell=True, stdout=PIPE)
    666648        p.wait()
     649        if p.returncode != 0:
     650            self.logger.errorPair("dvopsps failed on ", self.scratchDb.dvoDetectionTable)
     651            raise
    667652
    668653        ## dvopsps can take a very long time. try 2 or 3 times to re-establish communication with the db before proceeding?
     
    670655        self.ippToPspsDb.setIngestedBox(boxId, self.scratchDb.dbHost)
    671656
    672         # add fileID column
     657        # run 'ANALYZE' to get indexes up-to-snuff
    673658        sql = "ANALYZE TABLE " + self.scratchDb.dvoDetectionTable
    674659        try: self.scratchDb.execute(sql)
Note: See TracChangeset for help on using the changeset viewer.