- 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/loader.py
r35063 r35076 34 34 super(Loader, self).__init__(argv, 1, 1) 35 35 36 if self. config.parallel:36 if self.skychunk.parallel: 37 37 print "PARALLEL dvo" 38 38 else: … … 57 57 58 58 # create Datastore objects 59 self.datastore = Datastore(self.logger, self. config, self.ippToPspsDb)59 self.datastore = Datastore(self.logger, self.skychunk, self.ippToPspsDb) 60 60 61 61 # if an IN batch is requested, create and quit … … 65 65 batch = InitBatch(self.logger, 66 66 self.config, 67 self.skychunk, 67 68 self.gpc1Db, 68 69 self.ippToPspsDb, … … 77 78 78 79 79 # if an IN batch is requested, create and quit80 # if the 'once' option is passed, we do not loop multiple times in 'run' 80 81 self.onePassOnly = 0 81 82 if len(sys.argv) > 2 and sys.argv[2] == "once": … … 85 86 self.parsePollTimeArg("0.0166") 86 87 87 self. config.printAll()88 self.skychunk.printAll() 88 89 89 90 ''' 90 91 Overrides base-class version so we can ensure our scratch Db is using the right DVO Db 91 92 ''' 92 def refresh Config(self):93 94 ret = super(Loader, self).refresh Config()93 def refreshSkychunk(self): 94 95 ret = super(Loader, self).refreshSkychunk() 95 96 try: self.scratchDb 96 97 except: return ret 97 98 98 self.dvoDetections = DvoDetections(self.logger, self.config, self.s cratchDb.dbName)99 self.dvoDetections = DvoDetections(self.logger, self.config, self.skychunk, self.scratchDb.dbName) 99 100 100 101 return ret 101 102 102 103 ''' 103 Overrides base_class version so we can break out of processing loops if the configchanges104 Overrides base_class version so we can break out of processing loops if the skychunk changes 104 105 ''' 105 106 def checkClientStatus(self): 106 107 107 old ConfigName = self.config.name108 oldSkychunkName = self.skychunk.name 108 109 super(Loader, self).checkClientStatus() 109 if old ConfigName != self.config.name:110 self.logger.infoPair(" Config changed", "from '" + oldConfigName + "' to '" + self.config.name + "'")111 self. config.printAll()110 if oldSkychunkName != self.skychunk.name: 111 self.logger.infoPair("Skychunk changed", "from '" + oldSkychunkName + "' to '" + self.skychunk.name + "'") 112 self.skychunk.printAll() 112 113 return False 113 114 … … 125 126 126 127 abort = False 127 for batchType in self. config.batchTypes:128 for batchType in self.skychunk.batchTypes: 128 129 129 130 # get a stripe's worth of box IDs … … 161 162 self.logger.infoPair("Box dimensions", "%.1f / %.1f / %.1f" % (boxDim['RA'], boxDim['DEC'], boxDim['SIDE'])) 162 163 self.logger.infoPair(batchType + " items found in this box", "%d" % len(ids)) 163 boxSizeWithBorder = boxDim['SIDE'] + (self. config.BORDER * 2)164 boxSizeWithBorder = boxDim['SIDE'] + (self.skychunk.BORDER * 2) 164 165 boxSizeSansBorder = boxDim['SIDE'] 165 166 self.logger.infoPair("got here", "ok") … … 179 180 180 181 # should do we pre-ingest stuff from DVO? 181 # NOTE EAM : this chunk loads the dvo detections into the mysql db182 # NOTE EAM : this skychunk loads the dvo detections into the mysql db 182 183 # XXXX EAM : this should happen for both P2 and Stack detection 183 184 # XXXX EAM : in parallel model, this should happen for all P2 & Stack batches … … 250 251 batch = DetectionBatch(self.logger, 251 252 self.config, 253 self.skychunk, 252 254 self.gpc1Db, 253 255 self.ippToPspsDb, … … 259 261 batch = StackBatch(self.logger, 260 262 self.config, 263 self.skychunk, 261 264 self.gpc1Db, 262 265 self.ippToPspsDb, … … 269 272 batch = ObjectBatch(self.logger, 270 273 self.config, 274 self.skychunk, 271 275 self.gpc1Db, 272 276 self.ippToPspsDb,
Note:
See TracChangeset
for help on using the changeset viewer.
