IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2014, 12:30:45 PM (12 years ago)
Author:
eugene
Message:

merge changes (from past YEAR) into trunk

Location:
branches/eam_branches/ipp-ops-20130712/ippToPsps
Files:
2 edited

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  
    3939               AND batch_type = '" + batchType + "' \
    4040               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     41               AND comment = '" + self.skychunk.name + "' \
     42               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    4143               AND merged = 1 \
    4244               AND deleted_local = 0 \
     
    6567               AND batch_type = '" + batchType + "' \
    6668               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     69               AND comment = '" + self.skychunk.name + "' \
     70               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    6771               AND purged = 1 \
    6872               AND deleted_local = 0 \
     
    9296               AND batch_type = '" + batchType + "' \
    9397               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
     98               AND comment = '" + self.skychunk.name + "' \
     99               AND datastore_product = '" + self.skychunk.datastoreProduct + "' \
    94100               AND purged = 1 \
    95101               AND deleted_datastore = 0 \
     
    119125               AND batch_type = '" + batchType + "' \
    120126               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) \
    122130               AND deleted_datastore = 0 AND block_delete_datastore = 0"
    123131
     
    144152               AND batch_type = '" + batchType + "' \
    145153               AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    146                AND (loaded_to_ODM = -1 OR merge_worthy = 1) \
     154               AND (merge_worthy = 1) \
    147155               AND deleted_dxlayer = 0 and block_delete_dxlayer = 0"
    148156
     
    11081116        ,queue_ST \
    11091117        ,queue_OB \
     1118        ,queue_DF \
     1119        ,queue_DO \
     1120        ,queue_FW \
     1121        ,queue_FO \
    11101122        ,parallel \
     1123        ,P2_smf_version \
     1124        ,ST_cmf_version \
     1125        ,trange_start \
     1126        ,trange_end \
    11111127        FROM skychunk \
    11121128        WHERE name = '" + self.skychunk.name + "'"
     
    11501166            if rs.getInt(20) == 1: self.skychunk.batchTypes.append("ST")
    11511167            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")
    11521172
    11531173            self.skychunk.force = True # TODO
    11541174            self.skychunk.parallel = False # TODO
    11551175
    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)
    11571181
    11581182            if self.skychunk.parallel: print "USING parallel"
     
    16271651        # self.logger.infoPair("Items written to alt Db", "%d" % count)
    16281652
     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
    16291681    '''
    16301682    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.