IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2014, 3:42:24 PM (12 years ago)
Author:
heather
Message:

current ipptopsps before we discovered we need skinny objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/ipptopspsdb.py

    r36697 r36815  
    16511651        # self.logger.infoPair("Items written to alt Db", "%d" % count)
    16521652
     1653
     1654    '''
     1655    Creates a temporary table and shoves it full of stage_ids and ra/dec coords
     1656    '''
     1657    def storeAllItemsInDvodb(self, rows, dvo_db, batchType):
     1658
     1659        #try:
     1660        #    self.execute("DROP TABLE all_pending")
     1661        #except:
     1662        #    pass
     1663
     1664        #self.execute("CREATE TEMPORARY TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)")
     1665        for row in rows:
     1666
     1667            try:
     1668                uniq = dvo_db + "."+ batchType + "." + str(row[0])
     1669                sql = "INSERT INTO dvodb (dvo_db, batch_type, stage_id, ra_center, dec_center, uniq_key) \
     1670                       VALUES ( '" + dvo_db + "', '" + batchType + "'," + str(row[0]) + "," + str(row[1]) + " \
     1671                       , " + str(row[2]) + ", '"+uniq+"' ) "
     1672                print "sql 1: ", sql
     1673                self.execute(sql)
     1674            except: continue
     1675
     1676        #count = self.getRowCount("all_pending")
     1677        #self.logger.infoPair("Items written to Db", "%d" % count)
     1678
     1679
     1680
    16531681    '''
    16541682    Gets all items in the all_pending temporary table within the bounds of this box
Note: See TracChangeset for help on using the changeset viewer.