- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/jython/queue.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/ippToPsps/jython/queue.py
r36680 r37403 29 29 super(Queue, self).__init__(argv) 30 30 31 # print "inited ipptopsps"32 33 31 # create various objects 34 32 self.gpc1Db = Gpc1Db(self.logger, self.config) 35 # print "connect to gpc1"36 33 37 34 self.datastore = Datastore(self.logger, self.skychunk, self.ippToPspsDb) 38 39 print "made datastore"40 35 41 36 # connect to scratch database 42 37 self.scratchDb = ScratchDb(self.logger, self.config) 43 38 44 print "connect to scratchdb"45 46 39 try: 47 print "why doesn't this work"48 40 self.dvoObjects = DvoObjects(self.logger, self.config, self.skychunk, self.ippToPspsDb, self.scratchDb) 49 41 except: … … 51 43 raise 52 44 53 print "got objects"54 55 45 self.skychunk.printAll() 56 46 … … 63 53 ''' 64 54 def run(self): 65 print "here"55 self.logger.info("------------- starting queue.run -----------------") 66 56 # this outer while loop simply waits a few minutes then starts queuing again (as more stuff may appear in DVO over time) 67 57 while True: 68 58 69 59 self.ippToPspsDb.removeAllBoxes() 70 print "remove boxes" 60 71 61 # queue up batches that are processed but not loaded to datastore 72 62 for batchType in self.skychunk.batchTypes: … … 77 67 # get totals for whole area to check if there is anything to do 78 68 processedIDs = self.ippToPspsDb.getProcessedIDs(batchType) 79 print "got processed ids"80 69 consistantlyFailedIDs = self.ippToPspsDb.getConsistentlyFailedIDs(batchType) 81 print "got here" 70 82 71 # for object batches, get full list of stuff from Dvo 83 72 # XXX : need to fix 'dvo.setSkyArea' or this may not return the full list for a parallel dvo 84 if batchType == "OB": 73 74 # for object-like batches, info comes from dvo 75 if (batchType == "OB" or batchType =="DO" or batchType =="FO"): 85 76 self.dvoObjects.setSkyArea( 86 77 self.skychunk.minRa, … … 143 134 if (dec > 85): raise 144 135 145 print "dec, dD: ", dec, dD ,self.skychunk.maxDec136 # print "dec, dD: ", dec, dD ,self.skychunk.maxDec 146 137 147 138 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds … … 151 142 ra = self.skychunk.minRa + dR 152 143 153 print "ra, dR, maxRa", ra, dR, self.skychunk.maxRa144 # print "ra, dR, maxRa", ra, dR, self.skychunk.maxRa 154 145 155 146 # XXX not sure why this is not done with a for-loop... 156 147 while dec <= self.skychunk.maxDec: 157 148 while ra <= self.skychunk.maxRa: 158 print "here"159 149 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 160 150 minRA = ra - dR … … 174 164 len(ids))) 175 165 176 print "box_id: ", box_id177 178 166 if len(ids) > 0: self.ippToPspsDb.insertPending(box_id, batchType, ids) 179 167 # print "inserted pending"
Note:
See TracChangeset
for help on using the changeset viewer.
