Changeset 35605 for trunk/ippToPsps/jython/queue.py
- Timestamp:
- May 29, 2013, 2:30:34 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/queue.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/queue.py
r35417 r35605 37 37 self.datastore = Datastore(self.logger, self.skychunk, self.ippToPspsDb) 38 38 39 #print "made datastore"39 print "made datastore" 40 40 41 41 # connect to scratch database 42 42 self.scratchDb = ScratchDb(self.logger, self.config) 43 43 44 #print "connect to scratchdb"44 print "connect to scratchdb" 45 45 46 46 try: … … 50 50 raise 51 51 52 #print "got objects"52 print "got objects" 53 53 54 54 self.skychunk.printAll() … … 62 62 ''' 63 63 def run(self): 64 64 print "here" 65 65 # this outer while loop simply waits a few minutes then starts queuing again (as more stuff may appear in DVO over time) 66 66 while True: 67 67 68 68 self.ippToPspsDb.removeAllBoxes() 69 69 print "remove boxes" 70 70 # queue up batches that are processed but not loaded to datastore 71 71 for batchType in self.skychunk.batchTypes: 72 72 self.logger.infoPair("BatchType",batchType) 73 73 # self.logger.infoTitle("Previous failed datastore loads") 74 74 # self.publishAnyUnpublishedBatches(batchType) … … 76 76 # get totals for whole area to check if there is anything to do 77 77 processedIDs = self.ippToPspsDb.getProcessedIDs(batchType) 78 print "got processed ids" 78 79 consistantlyFailedIDs = self.ippToPspsDb.getConsistentlyFailedIDs(batchType) 79 80 print "got here" 80 81 # for object batches, get full list of stuff from Dvo 81 82 # XXX : need to fix 'dvo.setSkyArea' or this may not return the full list for a parallel dvo … … 136 137 if (dec > 85): raise 137 138 138 # print "dec, dD: ", dec, dD139 print "dec, dD: ", dec, dD ,self.skychunk.maxDec 139 140 140 141 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 141 dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 142 #dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 143 dR = 0.5*self.skychunk.boxSize 142 144 ra = self.skychunk.minRa + dR 143 145 144 # print "ra, dR: ", ra, dR146 print "ra, dR, maxRa", ra, dR, self.skychunk.maxRa 145 147 146 148 # XXX not sure why this is not done with a for-loop... 147 149 while dec <= self.skychunk.maxDec: 148 150 while ra <= self.skychunk.maxRa: 149 151 150 152 # a given box centered at RA,DEC with (linear) size of SIDE has the following bounds 151 153 minRA = ra - dR … … 175 177 if (dec > 85): raise 176 178 177 dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 179 #dR = 0.5*self.skychunk.boxSize / math.cos(math.radians(dec)) 180 dR = 0.5*self.skychunk.boxSize 178 181 ra = self.skychunk.minRa + dR 179 182
Note:
See TracChangeset
for help on using the changeset viewer.
