IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39153


Ignore:
Timestamp:
Nov 17, 2015, 4:59:36 PM (11 years ago)
Author:
eugene
Message:

pass the batchType into nativeIngestDetections; disallow use of multiple batchTypes in a detection-style batch

Location:
trunk/ippToPsps/jython
Files:
2 edited

Legend:

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

    r39152 r39153  
    676676    includes purging detections outside sky area
    677677    '''
    678     def nativeIngestDetections(self, boxId, boxDim):
     678    def nativeIngestDetections(self, boxId, boxDim, myBatchType):
    679679
    680680        # clear the 'ingested' field for all boxes owned by this host
     
    709709
    710710        # ST and FW need to use just a skycell
    711         if self.batchType == "ST" :
     711        if myBatchType == "ST" :
    712712            myBorder = self.skychunk.BORDER_SKYCELL
    713         if self.batchType == "FW" :
     713        if myBatchType == "FW" :
    714714            myBorder = self.skychunk.BORDER_SKYCELL
    715715
     
    796796            else:
    797797                cmd += " -photcode-start 12000 -photcode-end 12500"
    798         ## if (useFW == 1):
    799         ##     if (self.config.camera == "simtest"):
    800         ##         print "need photcodes for non gpc1 camera"
    801         ##     else:
    802         ##         print "need photcode for warp for gpc1 camera, default is no selection, should work, could be slow"
     798
     799        if (useST + useP2 + useDF + useFW > 1):
     800            self.logger.errorPair("multiple batch types in a run", "NOW ILLEGAL")
     801            os._exit(5)
    803802               
    804803        ## dvopsps can take a very long time. try 2 or 3 times to re-establish communication with the db before proceeding?
  • trunk/ippToPsps/jython/loader.py

    r39008 r39153  
    172172                    if (batchType == "P2" or batchType == "ST" or batchType =="DF" or batchType == "FW"):
    173173                        if self.config.resetDvo or not self.ippToPspsDb.isBoxIngested(boxId, self.scratchDb.dbHost):
    174                             if not self.dvo.nativeIngestDetections(boxId, boxDim):
     174                            if not self.dvo.nativeIngestDetections(boxId, boxDim, batchType):
    175175                                self.logger.error("Unable to ingest detections with nativeIngest")
    176176                                return False
Note: See TracChangeset for help on using the changeset viewer.