Changeset 35097 for trunk/ippToPsps/jython/queue.py
- Timestamp:
- Feb 6, 2013, 3:16:35 PM (13 years ago)
- Location:
- trunk/ippToPsps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps
- Property svn:mergeinfo changed
-
trunk/ippToPsps/jython
- Property svn:ignore
-
old new 1 1 *.class 2 Makefile 3 Makefile.in
-
- Property svn:ignore
-
trunk/ippToPsps/jython/queue.py
r33787 r35097 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 try: 33 self.dvoObjects = DvoObjects(self.logger, self.config )34 self.dvoObjects = DvoObjects(self.logger, self.config, self.skychunk, self.ippToPspsDb) 34 35 except: 35 36 self.exitProgram("Unable to create instance of DvoObject") 36 37 raise 37 38 38 self. config.printAll()39 self.skychunk.printAll() 39 40 40 41 if len(argv) > 2: self.parsePollTimeArg(sys.argv[2]) 41 42 42 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") … … 64 64 65 65 # 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 66 67 if batchType == "OB": 67 68 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) 72 73 rows = self.dvoObjects.allPopulatedRegionInfo 73 74 self.dvoObjects.printSummary() … … 76 77 else: 77 78 rows = self.gpc1Db.getItemsInThisDVODbForThisStage( 78 self. config.dvoLabel,79 self.skychunk.dvoLabel, 79 80 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)) 84 88 85 89 # first report total stuff … … 104 108 self.ippToPspsDb.storeAllItems(pending) 105 109 106 # loop through full range of RA/Dec queueing stuff in boxes of size self. config.boxSize110 # loop through full range of RA/Dec queueing stuff in boxes of size self.skychunk.boxSize 107 111 if len(ids) > 0: 108 112 … … 112 116 113 117 # starting positions 114 ra = self. config.minRa + self.config.halfBox115 dec = self. config.minDec + self.config.halfBox118 ra = self.skychunk.minRa + self.skychunk.halfBox 119 dec = self.skychunk.minDec + self.skychunk.halfBox 116 120 117 while ra <= self. config.maxRa:118 while dec <= self. config.maxDec:121 while ra <= self.skychunk.maxRa: 122 while dec <= self.skychunk.maxDec: 119 123 120 124 box_id = self.ippToPspsDb.insertBox(ra, dec) … … 125 129 ra, 126 130 dec, 127 self. config.boxSize,131 self.skychunk.boxSize, 128 132 len(ids))) 129 133 130 134 if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids) 131 135 132 dec = dec + self. config.boxSize133 dec = self. config.minDec + self.config.halfBox134 ra = ra + self. config.boxSize136 dec = dec + self.skychunk.boxSize 137 dec = self.skychunk.minDec + self.skychunk.halfBox 138 ra = ra + self.skychunk.boxSize 135 139 136 140 self.logger.info("+-------------+-------------+-------------+-------------+") … … 150 154 151 155 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) 153 157 tarballFile = Batch.getTarballFile(batchID) 154 158 self.logger.infoPair("Batch name", batchName)
Note:
See TracChangeset
for help on using the changeset viewer.
