Changeset 37239
- Timestamp:
- Aug 12, 2014, 3:27:57 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140717/ippToPsps/jython
- Files:
-
- 5 edited
-
dvo.py (modified) (3 diffs)
-
gpc1db.py (modified) (1 diff)
-
ipptopsps.py (modified) (4 diffs)
-
ipptopspsdb.py (modified) (7 diffs)
-
scratchdb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/ippToPsps/jython/dvo.py
r37173 r37239 63 63 # this scratch Db either has no DVO info ingested, or a different DVO ingested. Prompt user 64 64 if not self.correctDvo: 65 print "*******************************************************************************"66 65 self.logger.warning("switching to a new dvo: '" + self.skychunk.dvoLocation + "'") 67 66 # response = raw_input("(y/n) ") … … 105 104 106 105 if (self.skychunk.dvoLocation == 'none'): 107 print "do not load Photcodes for place-holder DVO " + self.skychunk.dvoLocation106 # print "do not load Photcodes for place-holder DVO " + self.skychunk.dvoLocation 108 107 return False 109 108 … … 160 159 161 160 if (self.skychunk.dvoLocation == 'none'): 162 print "do not load SkyTable for place-holder DVO " + self.skychunk.dvoLocation161 # print "do not load SkyTable for place-holder DVO " + self.skychunk.dvoLocation 163 162 return False 164 163 -
branches/eam_branches/ipp-20140717/ippToPsps/jython/gpc1db.py
r37208 r37239 117 117 stage = "forcedwarp" 118 118 sql = "SELECT differentStuff from Stufftable" 119 120 self.logger.infoPair("sql for pending:", sql)121 119 122 120 try: -
branches/eam_branches/ipp-20140717/ippToPsps/jython/ipptopsps.py
r37133 r37239 55 55 raise 56 56 57 print "check client status"58 57 self.checkClientStatus() 59 58 … … 143 142 def checkClientStatus(self): 144 143 145 print "updateClient (add this process to client table)"146 144 self.ippToPspsDb.updateClient(self.config.programName, self.HOST, self.PID) 147 145 148 print "check if isKilled (has someone killed me?)"149 146 if self.ippToPspsDb.isKilled(self.HOST, self.PID): 150 147 self.exitProgram("killed via Db") … … 152 149 # this loop pauses the process if we have no skychunk or we have set it to pause 153 150 firstTimeIn = True 154 print "refreshSkychunk"155 151 while not self.refreshSkychunk() or self.ippToPspsDb.isPaused(self.HOST, self.PID): 156 157 print "looping in ipptopsps"158 159 152 self.ippToPspsDb.updateClient(self.config.programName, self.HOST, self.PID) 160 153 if self.ippToPspsDb.isKilled(self.HOST, self.PID): … … 163 156 firstTimeIn = False 164 157 time.sleep(self.PAUSEPERIOD) 165 166 print "DONE looping in ipptopsps"167 158 168 159 ''' -
branches/eam_branches/ipp-20140717/ippToPsps/jython/ipptopspsdb.py
r37232 r37239 1259 1259 AND batch_type = '" + batchType + "'") 1260 1260 1261 print "deleted old items"1262 1263 1261 for id in ids: 1264 1262 sql = "INSERT IGNORE INTO pending \ … … 1267 1265 (" + str(box_id) + ", '" + batchType + "', " + str(id) + ")" 1268 1266 1269 print "sql: ", sql1270 1271 1267 try: self.execute(sql) 1272 1268 except: 1273 1269 print "failed to insert into pending" 1270 print "sql: " + sql 1274 1271 raise 1275 1272 … … 1296 1293 GROUP BY ra_center LIMIT 1" 1297 1294 1298 # XXX print "sql: ", sql1299 1300 1295 try: rs = self.executeQuery(sql) 1301 1296 except: … … 1303 1298 print "SQL: " + sql 1304 1299 1305 print "SQL: " + sql1306 1300 if not rs.next(): 1307 1301 self.logger.errorPair("No outstanding boxes", "nothing to do here") … … 1384 1378 print "SQL: " + sql 1385 1379 1386 print "SQL: " + sql1387 1380 if not rs.next(): 1388 1381 self.logger.infoPair("No outstanding boxes", "nothing to do here") … … 1620 1613 VALUES ( '" + dvo_db + "', '" + batchType + "'," + str(row[0]) + "," + str(row[1]) + " \ 1621 1614 , " + str(row[2]) + ", '"+uniq+"' ) " 1622 print "sql 1: ", sql1615 # print "sql 1: ", sql 1623 1616 self.execute(sql) 1624 1617 except: continue … … 1641 1634 AND dec_bore BETWEEN " + str(minDEC) + " AND " + str(maxDEC) 1642 1635 1643 print "items: ", sql1644 1645 1636 try: 1646 1637 rs = self.executeQuery(sql) 1647 1638 while (rs.next()): 1648 1639 ids.append(rs.getInt(1)) 1649 print "stage_id: " + str(rs.getInt(1))1650 1640 except: 1651 1641 self.logger.errorPair("Can't get items in this box", sql) -
branches/eam_branches/ipp-20140717/ippToPsps/jython/scratchdb.py
r37179 r37239 482 482 try: self.execute(sql) 483 483 except: 484 print "problem dropping DVO " + dvoDetectionTable484 self.logger.errorPair("problem dropping DVO table", dvoDetectionTable) 485 485 pass 486 486 … … 561 561 562 562 # we need a big enough memory table for the incoming detections 563 print "requested memory in gigs: ", self.memoryTableSize563 # print "requested memory in gigs: ", self.memoryTableSize 564 564 tableSize = int(self.memoryTableSize) * 1024 * 1024 * 1024 565 self.logger.infoPair("setting max heap size: ", tableSize) 566 565 567 sql = "set @@max_heap_table_size = " + str(tableSize) 566 print "setting max heap size: ", sql567 568 try: self.execute(sql) 568 569 except:
Note:
See TracChangeset
for help on using the changeset viewer.
