- Timestamp:
- Jul 17, 2014, 12:30:45 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-ops-20130712/ippToPsps
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
jython/ipptopspsdb.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-ops-20130712/ippToPsps
- Property svn:mergeinfo deleted
-
branches/eam_branches/ipp-ops-20130712/ippToPsps/jython/ipptopspsdb.py
r35605 r37066 39 39 AND batch_type = '" + batchType + "' \ 40 40 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 41 AND comment = '" + self.skychunk.name + "' \ 42 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 41 43 AND merged = 1 \ 42 44 AND deleted_local = 0 \ … … 65 67 AND batch_type = '" + batchType + "' \ 66 68 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 69 AND comment = '" + self.skychunk.name + "' \ 70 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 67 71 AND purged = 1 \ 68 72 AND deleted_local = 0 \ … … 92 96 AND batch_type = '" + batchType + "' \ 93 97 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 98 AND comment = '" + self.skychunk.name + "' \ 99 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 94 100 AND purged = 1 \ 95 101 AND deleted_datastore = 0 \ … … 119 125 AND batch_type = '" + batchType + "' \ 120 126 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 121 AND (loaded_to_ODM = -1 OR merge_worthy = 1) \ 127 AND comment = '" + self.skychunk.name + "' \ 128 AND datastore_product = '" + self.skychunk.datastoreProduct + "' \ 129 AND (merge_worthy = 1) \ 122 130 AND deleted_datastore = 0 AND block_delete_datastore = 0" 123 131 … … 144 152 AND batch_type = '" + batchType + "' \ 145 153 AND dvo_db = '" + self.skychunk.dvoLabel + "' \ 146 AND ( loaded_to_ODM = -1 ORmerge_worthy = 1) \154 AND (merge_worthy = 1) \ 147 155 AND deleted_dxlayer = 0 and block_delete_dxlayer = 0" 148 156 … … 1108 1116 ,queue_ST \ 1109 1117 ,queue_OB \ 1118 ,queue_DF \ 1119 ,queue_DO \ 1120 ,queue_FW \ 1121 ,queue_FO \ 1110 1122 ,parallel \ 1123 ,P2_smf_version \ 1124 ,ST_cmf_version \ 1125 ,trange_start \ 1126 ,trange_end \ 1111 1127 FROM skychunk \ 1112 1128 WHERE name = '" + self.skychunk.name + "'" … … 1150 1166 if rs.getInt(20) == 1: self.skychunk.batchTypes.append("ST") 1151 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") 1152 1172 1153 1173 self.skychunk.force = True # TODO 1154 1174 self.skychunk.parallel = False # TODO 1155 1175 1156 if rs.getInt(22) == 1: self.skychunk.parallel = True 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) 1157 1181 1158 1182 if self.skychunk.parallel: print "USING parallel" … … 1627 1651 # self.logger.infoPair("Items written to alt Db", "%d" % count) 1628 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 1629 1681 ''' 1630 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.
