- Timestamp:
- Jan 31, 2013, 4:13:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/ippToPsps/jython/queue.py
r35003 r35076 29 29 # create various objects 30 30 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 32 33 33 try: 34 self.dvoObjects = DvoObjects(self.logger, self.config )34 self.dvoObjects = DvoObjects(self.logger, self.config, self.skychunk) 35 35 except: 36 36 self.exitProgram("Unable to create instance of DvoObject") 37 37 raise 38 38 39 self. config.printAll()39 self.skychunk.printAll() 40 40 41 41 if len(argv) > 2: self.parsePollTimeArg(sys.argv[2]) … … 43 43 ''' 44 44 Main processing loop. 45 Tiled area is defined in configand looks for available stage_ids for each tile and writes them to ippToPsps database ready for processing45 Tiled area is defined in 'skychunk' and looks for available stage_ids for each tile and writes them to ippToPsps database ready for processing 46 46 by one or more loading clients that may be running on any host 47 47 ''' … … 54 54 55 55 # 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: 57 57 58 58 self.logger.infoTitle("Previous failed datastore loads") … … 66 66 if batchType == "OB": 67 67 self.dvoObjects.setSkyArea( 68 self. config.minRa,69 self. config.maxRa,70 self. config.minDec,71 self. config.maxDec)68 self.skychunk.minRa, 69 self.skychunk.maxRa, 70 self.skychunk.minDec, 71 self.skychunk.maxDec) 72 72 rows = self.dvoObjects.allPopulatedRegionInfo 73 73 self.dvoObjects.printSummary() … … 76 76 else: 77 77 rows = self.gpc1Db.getItemsInThisDVODbForThisStage( 78 self. config.dvoLabel,78 self.skychunk.dvoLabel, 79 79 batchType, 80 self. config.minRa,81 self. config.maxRa,82 self. config.minDec,83 self. config.maxDec)80 self.skychunk.minRa, 81 self.skychunk.maxRa, 82 self.skychunk.minDec, 83 self.skychunk.maxDec) 84 84 85 85 # EAM TEST I/O … … 107 107 self.ippToPspsDb.storeAllItems(pending) 108 108 109 # loop through full range of RA/Dec queueing stuff in boxes of size self. config.boxSize109 # loop through full range of RA/Dec queueing stuff in boxes of size self.skychunk.boxSize 110 110 if len(ids) > 0: 111 111 … … 115 115 116 116 # starting positions 117 ra = self. config.minRa + self.config.halfBox118 dec = self. config.minDec + self.config.halfBox117 ra = self.skychunk.minRa + self.skychunk.halfBox 118 dec = self.skychunk.minDec + self.skychunk.halfBox 119 119 120 while ra <= self. config.maxRa:121 while dec <= self. config.maxDec:120 while ra <= self.skychunk.maxRa: 121 while dec <= self.skychunk.maxDec: 122 122 123 123 box_id = self.ippToPspsDb.insertBox(ra, dec) … … 128 128 ra, 129 129 dec, 130 self. config.boxSize,130 self.skychunk.boxSize, 131 131 len(ids))) 132 132 133 133 if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids) 134 134 135 dec = dec + self. config.boxSize136 dec = self. config.minDec + self.config.halfBox137 ra = ra + self. config.boxSize135 dec = dec + self.skychunk.boxSize 136 dec = self.skychunk.minDec + self.skychunk.halfBox 137 ra = ra + self.skychunk.boxSize 138 138 139 139 self.logger.info("+-------------+-------------+-------------+-------------+") … … 153 153 154 154 batchName = Batch.getNameFromID(batchID) 155 subDir = Batch.getSubDir(self. config.basePath, batchType, self.config.dvoLabel)155 subDir = Batch.getSubDir(self.skychunk.basePath, batchType, self.skychunk.dvoLabel) 156 156 tarballFile = Batch.getTarballFile(batchID) 157 157 self.logger.infoPair("Batch name", batchName)
Note:
See TracChangeset
for help on using the changeset viewer.
