IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 3:16:35 PM (13 years ago)
Author:
eugene
Message:

upgrade to ippToPsps (see doc/upgrade.txt): adds native dvo to mysql ingest operations, adds autogen configuration & installation, splits out global config information from new "skychunk" information (current region on the sky being processed), adds test suites

Location:
trunk/ippToPsps
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps

  • trunk/ippToPsps/jython

    • Property svn:ignore
      •  

        old new  
        11*.class
         2Makefile
         3Makefile.in
  • trunk/ippToPsps/jython/queue.py

    r33787 r35097  
    2929        # create various objects
    3030        self.gpc1Db = Gpc1Db(self.logger, self.config)
    31         self.datastore = Datastore(self.logger, self.config, self.ippToPspsDb)
     31        self.datastore = Datastore(self.logger, self.skychunk, self.ippToPspsDb)
     32
    3233        try:
    33             self.dvoObjects = DvoObjects(self.logger, self.config)
     34            self.dvoObjects = DvoObjects(self.logger, self.config, self.skychunk, self.ippToPspsDb)
    3435        except:
    3536            self.exitProgram("Unable to create instance of DvoObject")
    3637            raise
    3738
    38         self.config.printAll()
     39        self.skychunk.printAll()
    3940
    4041        if len(argv) > 2: self.parsePollTimeArg(sys.argv[2])
    41    
    4242
    4343    '''
    4444    Main processing loop.
    45     Tiled area is defined in config and looks for available stage_ids for each tile and writes them to ippToPsps database ready for processing
     45    Tiled area is defined in 'skychunk' and looks for available stage_ids for each tile and writes them to ippToPsps database ready for processing
    4646    by one or more loading clients that may be running on any host
    4747    '''
     
    5454       
    5555            # queue up batches that are processed but not loaded to datastore
    56             for batchType in self.config.batchTypes:
     56            for batchType in self.skychunk.batchTypes:
    5757
    5858                self.logger.infoTitle("Previous failed datastore loads")
     
    6464
    6565                # for object batches, get full list of stuff from Dvo
     66                # XXX : need to fix 'dvo.setSkyArea' or this may not return the full list for a parallel dvo
    6667                if batchType == "OB":
    6768                    self.dvoObjects.setSkyArea(
    68                             self.config.minRa,
    69                             self.config.maxRa,
    70                             self.config.minDec,
    71                             self.config.maxDec)
     69                            self.skychunk.minRa,
     70                            self.skychunk.maxRa,
     71                            self.skychunk.minDec,
     72                            self.skychunk.maxDec)
    7273                    rows = self.dvoObjects.allPopulatedRegionInfo
    7374                    self.dvoObjects.printSummary()
     
    7677                else:
    7778                    rows = self.gpc1Db.getItemsInThisDVODbForThisStage(
    78                             self.config.dvoLabel,
     79                            self.skychunk.dvoLabel,
    7980                            batchType,
    80                             self.config.minRa,
    81                             self.config.maxRa,
    82                             self.config.minDec,
    83                             self.config.maxDec)
     81                            self.skychunk.minRa,
     82                            self.skychunk.maxRa,
     83                            self.skychunk.minDec,
     84                            self.skychunk.maxDec)
     85
     86                # EAM TEST I/O
     87                self.logger.infoPair("received rows from db:", len(rows))
    8488
    8589                # first report total stuff
     
    104108                self.ippToPspsDb.storeAllItems(pending)
    105109
    106                 # loop through full range of RA/Dec queueing stuff in boxes of size self.config.boxSize
     110                # loop through full range of RA/Dec queueing stuff in boxes of size self.skychunk.boxSize
    107111                if len(ids) > 0:
    108112
     
    112116   
    113117                    # starting positions
    114                     ra = self.config.minRa + self.config.halfBox
    115                     dec = self.config.minDec + self.config.halfBox
     118                    ra = self.skychunk.minRa + self.skychunk.halfBox
     119                    dec = self.skychunk.minDec + self.skychunk.halfBox
    116120   
    117                     while ra <= self.config.maxRa:
    118                        while dec <= self.config.maxDec:
     121                    while ra <= self.skychunk.maxRa:
     122                       while dec <= self.skychunk.maxDec:
    119123           
    120124                           box_id = self.ippToPspsDb.insertBox(ra, dec)
     
    125129                                       ra,
    126130                                       dec,
    127                                        self.config.boxSize,
     131                                       self.skychunk.boxSize,
    128132                                       len(ids)))
    129133               
    130134                           if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids)
    131135
    132                            dec = dec + self.config.boxSize
    133                        dec = self.config.minDec + self.config.halfBox
    134                        ra = ra + self.config.boxSize
     136                           dec = dec + self.skychunk.boxSize
     137                       dec = self.skychunk.minDec + self.skychunk.halfBox
     138                       ra = ra + self.skychunk.boxSize
    135139           
    136140                self.logger.info("+-------------+-------------+-------------+-------------+")
     
    150154   
    151155            batchName = Batch.getNameFromID(batchID)
    152             subDir = Batch.getSubDir(self.config.basePath, batchType, self.config.dvoLabel)
     156            subDir = Batch.getSubDir(self.skychunk.basePath, batchType, self.skychunk.dvoLabel)
    153157            tarballFile = Batch.getTarballFile(batchID)
    154158            self.logger.infoPair("Batch name", batchName)
Note: See TracChangeset for help on using the changeset viewer.