IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36727


Ignore:
Timestamp:
May 2, 2014, 6:47:15 PM (12 years ago)
Author:
heather
Message:

stack batch work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/stackbatch.py

    r36726 r36727  
    619619        self.logger.infoPair("Procesing table", "StackObject")
    620620       
    621        
    622 
    623 
    624 
    625 
    626621        self.logger.infoPair("inserting non-filter dependent items into", "StackObject")
    627622
     
    749744                   FROM " + f + "SkyChip_psf"
    750745             
    751 
    752              self.scratchDb.execute(sql)
    753 
     746             try:
     747                 self.scratchDb.execute(sql)
     748             except:
     749                 self.logger.errorPair('failed sql',sql)
     750                 return
    754751             #it is possible to drop some detections from dvo (that are present in the cmf). when that happens we get a 0 for objid
    755752        #we drop those...
    756753
     754        self.logger.infoPair("Deleting", "entries with StackObject.objID = 0")
    757755        sql="DELETE FROM StackObject where objID = 0"
    758         self.scratchDb.execute(sql)
    759         self.logger.infoPair("Deleting", "entries with StackObject.objID = 0")
    760        
    761         self.scratchDb.updateAllRows("StackObject", "surveyID", str(self.surveyID))
    762        
     756        try:
     757            self.scratchDb.execute(sql)
     758        except:
     759            self.logger.errorPair('failed sql',sql)
     760            return
     761       
     762        try:
     763            self.scratchDb.updateAllRows("StackObject", "surveyID", str(self.surveyID))
     764        except:
     765            self.logger.errorPair('failed update surveyID on','StackObject')
     766           
    763767#        self.scratchDb.updateFilterID("StackObject", f+".00000")
    764768       
     
    791795        ### XXX this should not be a DEEP_STACK only case...
    792796        if False and self.stackType == "DEEP_STACK":
    793 
     797            ## need to do for all filters?
    794798            #if deep stack and instFlux = null and err not null
    795799            sql = "UPDATE StackObject AS a, SkyChip_psf AS b \
     
    931935
    932936        self.scratchDb.updateAllRows("StackApFlx", "surveyID", str(self.surveyID))
    933         self.scratchDb.updateFilterID("StackApFlx", self.filter)
    934937        self.scratchDb.updateAllRows("StackApFlx", "dataRelease", str(self.skychunk.dataRelease))
    935         self.scratchDb.updateAllRows("StackApFlx", "activeFlag", "0")
    936         ##self.updateStackMetaID("StackApFlx")
    937938        self.updateStackTypeID("StackApFlx")
    938939        self.updateDvoIDs("StackApFlx")
Note: See TracChangeset for help on using the changeset viewer.