IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 1, 2014, 5:27:11 PM (12 years ago)
Author:
eugene
Message:

remove deprecated code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140717/ippToPsps/jython/ipptopspsdb.py

    r37133 r37171  
    166166
    167167        return ids
    168 
    169     ## '''
    170     ## XXX EAM : removed this function and made it more explicit (with an additional block)
    171     ## Returns a list of merged batch IDs that are merged but not yet deleted
    172     ## '''
    173     ## def getMergedButNotDeletedBatchIDs(self, batchType, column):
    174     ##
    175     ##     sql = "SELECT DISTINCT batch_id \
    176     ##            FROM batch \
    177     ##            WHERE timestamp > '" + self.skychunk.epoch + "' \
    178     ##            AND batch_type = '" + batchType + "' \
    179     ##            AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    180     ##            AND merged = 1 \
    181     ##            AND " + column + " = 0"
    182     ##
    183     ##     ids = []
    184     ##     try:
    185     ##         rs = self.executeQuery(sql)
    186     ##         while (rs.next()): ids.append(rs.getInt(1))
    187     ##         rs.close()
    188     ##     except:
    189     ##         self.logger.exception("Can't query for merged batch ids in ipptopsps Db")
    190     ##
    191     ##     self.logger.debug("Found %d merged but un-deleted items" % len(ids))
    192     ##
    193     ##     return ids
    194 
    195     ## '''
    196     ## Returns a list of batch IDs marked as 'purged' but not yet deleted
    197     ## XXX EAM : removed this function and made it more explicit (with an additional block)
    198     ## '''
    199     ## def getPurgedButNotDeletedBatchIDs(self, batchType, column):
    200     ##
    201     ##     sql = "SELECT DISTINCT batch_id \
    202     ##            FROM batch \
    203     ##            WHERE timestamp > '" + self.skychunk.epoch + "' \
    204     ##            AND batch_type = '" + batchType + "' \
    205     ##            AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    206     ##            AND purged = 1 \
    207     ##            AND " + column + " = 0"
    208     ##
    209     ##     ids = []
    210     ##     try:
    211     ##         rs = self.executeQuery(sql)
    212     ##         while (rs.next()): ids.append(rs.getInt(1))
    213     ##         rs.close()
    214     ##     except:
    215     ##         self.logger.exception("Can't query for merged batch ids in ipptopsps Db")
    216     ##
    217     ##
    218     ##     self.logger.debug("Found %d merged but un-deleted items" % len(ids))
    219     ##
    220     ##     return ids
    221 
    222     ## '''
    223     ## Returns a list of processed batch IDs that have been loaded to the ODM but not yet deleted
    224     ## '''
    225     ## def getLoadedToODMButNotDeletedBatchIDs(self, batchType, column):
    226     ##
    227     ##     sql = "SELECT DISTINCT batch_id \
    228     ##            FROM batch \
    229     ##            WHERE timestamp > '" + self.skychunk.epoch + "' \
    230     ##            AND batch_type = '" + batchType + "' \
    231     ##            AND dvo_db = '" + self.skychunk.dvoLabel + "' \
    232     ##            AND (loaded_to_ODM = -1 OR merge_worthy = 1) \
    233     ##            AND " + column + " = 0"
    234     ##
    235     ##     ids = []
    236     ##     try:
    237     ##         rs = self.executeQuery(sql)
    238     ##         while (rs.next()): ids.append(rs.getInt(1))
    239     ##         rs.close()
    240     ##     except:
    241     ##         self.logger.exception("Can't query for merged batch ids in ipptopsps Db")
    242     ##
    243     ##     self.logger.debug("Found %d merged but un-deleted items" % len(ids))
    244     ##
    245     ##     return ids
    246 
    247     # '''
    248     # Returns a list of merged batch IDs that are not deleted from local disk
    249     # '''
    250     # def getMergedButNotDeletedFromLocalDisk(self, batchType):
    251     #     return self.getMergedButNotDeletedBatchIDs(batchType, "deleted_local")
    252 
    253     ## '''
    254     ## Returns a list of processed batch IDs that are loaded to the ODM, but not deleted from local disk
    255     ## '''
    256     ## def getLoadedToODMButNotDeletedFromLocalDisk(self, batchType):
    257     ##     return self.getLoadedToODMButNotDeletedBatchIDs(batchType, "deleted_local")
    258     ##
    259     ## '''
    260     ## Returns a list of processed batch IDs that are loaded to the ODM, but not deleted from datastore
    261     ## '''
    262     ## def getLoadedToODMButNotDeletedFromDatastore(self, batchType):
    263     ##     return self.getLoadedToODMButNotDeletedBatchIDs(batchType, "deleted_datastore")
    264     ##
    265     ## '''
    266     ## Returns a list of processed batch IDs that are loaded to the ODM, but not deleted from DXLayer
    267     ## '''
    268     ## def getLoadedToODMButNotDeletedFromDXLayer(self, batchType):
    269     ##     return self.getLoadedToODMButNotDeletedBatchIDs(batchType, "deleted_dxlayer")
    270 
    271     ## '''
    272     ## Returns a list of purged  batch IDs that not deleted from local disk
    273     ## '''
    274     ## def getPurgedButNotDeletedFromLocalDisk(self, batchType):
    275     ##     return self.getPurgedButNotDeletedBatchIDs(batchType, "deleted_local")
    276     ##
    277     ## '''
    278     ## Returns a list of purged batch IDs that are not deleted from datastore
    279     ## '''
    280     ## def getPurgedButNotDeletedFromDatastore(self, batchType):
    281     ##     return self.getPurgedButNotDeletedBatchIDs(batchType, "deleted_datastore")
    282 
    283168
    284169    '''
     
    17001585            pass
    17011586
    1702         # XXX EAM : 20140727: for now this is not temporary (for debugging)
    1703         # self.execute("CREATE TEMPORARY TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)")
    1704         self.execute("CREATE TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)")
     1587        self.execute("CREATE TEMPORARY TABLE all_pending (stage_id bigint(20), ra_bore float, dec_bore float)")
    17051588        for row in rows:
    17061589
     
    17141597        count = self.getRowCount("all_pending")
    17151598        self.logger.infoPair("Items written to Db", "%d" % count)
    1716 
    1717         # try:
    1718         #     self.execute("DROP TABLE all_pending_alt")
    1719         # except:
    1720         #     pass
    1721         #
    1722         # self.execute("CREATE TABLE all_pending_alt (stage_id bigint(20), ra_bore float, dec_bore float)")
    1723         # for row in rows:
    1724         #     try:
    1725         #         sql = "INSERT INTO all_pending_alt (stage_id, ra_bore, dec_bore) \
    1726         #                VALUES (%d, %f, %f)" % (row[0], row[1], row[2])
    1727         #         print "sql 2: ", sql
    1728         #         self.execute(sql)
    1729         #     except: continue
    1730         #
    1731         # count = self.getRowCount("all_pending_alt")
    1732         # self.logger.infoPair("Items written to alt Db", "%d" % count)
    1733 
    17341599
    17351600    '''
     
    17651630    def getItemsInThisBox(self, minRA, maxRA, minDEC, maxDEC):
    17661631
    1767         # the old linear size is ill-conceived
    1768         ## XX halfSide = self.skychunk.boxSize/2.0
    1769         ## XX minRa =  ra-halfSide
    1770         ## XX maxRa = ra+halfSide
    1771         ## XX minDec = dec-halfSide
    1772         ## XX maxDec = dec+halfSide
    1773 
    17741632        ids = []
    17751633
Note: See TracChangeset for help on using the changeset viewer.