Changeset 35605 for trunk/ippToPsps/jython/ipptopspsdb.py
- Timestamp:
- May 29, 2013, 2:30:34 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/ipptopspsdb.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/ipptopspsdb.py
r35311 r35605 785 785 survey, \ 786 786 dvo_db, \ 787 datastore_product \ 787 datastore_product, \ 788 comment \ 788 789 ) VALUES ( \ 789 790 '" + batchType + "', \ … … 791 792 '" + self.skychunk.survey + "', \ 792 793 '" + self.skychunk.dvoLabel + "', \ 793 '" + self.skychunk.datastoreProduct + "' \ 794 '" + self.skychunk.datastoreProduct + "', \ 795 '" + self.skychunk.name + "' \ 794 796 )" 795 797 self.logger.infoPair("heather:","sql") … … 1215 1217 ('" + self.skychunk.name + "', " + str(ra) + ", " + str(dec) + ", " + str(self.skychunk.boxSize) + ")" 1216 1218 1219 # print "insertBox: ", sql 1220 1217 1221 self.execute(sql) 1218 1222 id = self.getBoxId(ra, dec) … … 1556 1560 1557 1561 sql = "SELECT id, ra_center, dec_center \ 1558 FROM box \1559 WHERE skychunk = '" + self.skychunk.name+ "' \1562 FROM box join skychunk on box.skychunk = skychunk.name \ 1563 WHERE dvo_label = '" + self.skychunk.dvoLabel + "' \ 1560 1564 ORDER BY ra_center, dec_center" 1561 1565 … … 1599 1603 sql = "INSERT INTO all_pending (stage_id, ra_bore, dec_bore) \ 1600 1604 VALUES (%d, %f, %f)" % (row[0], row[1], row[2]) 1605 # print "sql 1: ", sql 1601 1606 self.execute(sql) 1602 1607 except: continue … … 1604 1609 count = self.getRowCount("all_pending") 1605 1610 self.logger.infoPair("Items written to Db", "%d" % count) 1611 1612 # try: 1613 # self.execute("DROP TABLE all_pending_alt") 1614 # except: 1615 # pass 1616 # 1617 # self.execute("CREATE TABLE all_pending_alt (stage_id bigint(20), ra_bore float, dec_bore float)") 1618 # for row in rows: 1619 # try: 1620 # sql = "INSERT INTO all_pending_alt (stage_id, ra_bore, dec_bore) \ 1621 # VALUES (%d, %f, %f)" % (row[0], row[1], row[2]) 1622 # print "sql 2: ", sql 1623 # self.execute(sql) 1624 # except: continue 1625 # 1626 # count = self.getRowCount("all_pending_alt") 1627 # self.logger.infoPair("Items written to alt Db", "%d" % count) 1606 1628 1607 1629 ''' … … 1624 1646 AND dec_bore BETWEEN " + str(minDEC) + " AND " + str(maxDEC) 1625 1647 1648 print "items: ", sql 1649 1626 1650 try: 1627 1651 rs = self.executeQuery(sql)
Note:
See TracChangeset
for help on using the changeset viewer.
