- Timestamp:
- Jun 7, 2014, 5:36:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/ippToPsps/jython/ipptopspsdb.py
r36201 r36826 1116 1116 ,queue_ST \ 1117 1117 ,queue_OB \ 1118 ,queue_DF \ 1119 ,queue_DO \ 1120 ,queue_FW \ 1121 ,queue_FO \ 1118 1122 ,parallel \ 1119 1123 ,P2_smf_version \ … … 1162 1166 if rs.getInt(20) == 1: self.skychunk.batchTypes.append("ST") 1163 1167 if rs.getInt(21) == 1: self.skychunk.batchTypes.append("OB") 1168 if rs.getInt(22) == 1: self.skychunk.batchTypes.append("DF") 1169 if rs.getInt(23) == 1: self.skychunk.batchTypes.append("DO") 1170 if rs.getInt(24) == 1: self.skychunk.batchTypes.append("FW") 1171 if rs.getInt(25) == 1: self.skychunk.batchTypes.append("FO") 1164 1172 1165 1173 self.skychunk.force = True # TODO 1166 1174 self.skychunk.parallel = False # TODO 1167 1175 1168 if rs.getInt(2 2) == 1: self.skychunk.parallel = True1169 self.skychunk.P2_smf_version = rs.getString(2 3)1170 self.skychunk.ST_cmf_version = rs.getString(2 4)1171 self.skychunk.trange_start = rs.getString(2 5)1172 self.skychunk.trange_end = rs.getString( 26)1176 if rs.getInt(26) == 1: self.skychunk.parallel = True 1177 self.skychunk.P2_smf_version = rs.getString(27) 1178 self.skychunk.ST_cmf_version = rs.getString(28) 1179 self.skychunk.trange_start = rs.getString(29) 1180 self.skychunk.trange_end = rs.getString(30) 1173 1181 1174 1182 if self.skychunk.parallel: print "USING parallel" … … 1643 1651 # self.logger.infoPair("Items written to alt Db", "%d" % count) 1644 1652 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 1645 1681 ''' 1646 1682 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.
