IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2013, 2:23:09 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130207/ippToPsps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130207/ippToPsps

  • branches/eam_branches/ipp-20130207/ippToPsps/jython/scratchdb.py

    r35097 r35235  
    1919    Constructor
    2020    '''
    21     def __init__(self, logger, config, dbVersion, dbName=None):
     21    def __init__(self, logger, config):
    2222
    2323        # create gpc1 database objects
     24        # XXX the test option is probably not needed since
     25        # the scratchDb config infor is set up specially
    2426        if (config.test):
    2527            dbType = "localdatabase_test"
     
    2729            dbType = "localdatabase"
    2830
    29         if not dbName:
    30             dbName = config.getDbName(dbType)
    31             dbName += dbVersion
     31        print "trying to connect: ", dbType
     32
     33        dbName = config.getDbName(dbType)
    3234
    3335        super(ScratchDb, self).__init__(logger, config, dbType, dbName)
     
    432434    def purgeTheseDvoRegions(self, regions, fileTypes):
    433435
    434         detectionCount = self.getRowCount(self.dvoDetectionTable)
     436        # XXX this must have been a remnant from something else: we are deleting a region, not entries from the dvoDetectionTable
     437        # detectionCount = self.getRowCount(self.dvoDetectionTable)
    435438        for region in regions:
    436439         
     
    448451                    pass
    449452
    450         deletedDetectionCount = detectionCount - self.getRowCount(self.dvoDetectionTable)
     453        # deletedDetectionCount = detectionCount - self.getRowCount(self.dvoDetectionTable)
    451454
    452455        # after a big detection delete, we should OPTIMIZE the table
    453         if deletedDetectionCount > 0:
    454             self.logger.infoPair("Running OPTIMIZE on ", self.dvoDetectionTable)
    455             self.optimizeTable(self.dvoDetectionTable)
    456 
    457         return deletedDetectionCount
     456        # if deletedDetectionCount > 0:
     457        #     self.logger.infoPair("Running OPTIMIZE on ", self.dvoDetectionTable)
     458        #     self.optimizeTable(self.dvoDetectionTable)
     459
     460        return 1
    458461           
    459462    '''
Note: See TracChangeset for help on using the changeset viewer.