IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2012, 12:02:48 PM (14 years ago)
Author:
rhenders
Message:

Big changes to support a new Config class that encapuslates the xml config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/ipptopspsdb.py

    r32932 r33259  
    1717    Constructor
    1818    '''
    19     def __init__(self, logger, doc):
    20         super(IppToPspsDb, self).__init__(logger, doc, "ipptopspsdatabase")
     19    def __init__(self, logger, config):
     20        super(IppToPspsDb, self).__init__(logger, config, "ipptopspsdatabase")
    2121
    2222        self.MAX_FAILS = 5
     
    590590    Creates a new batch. This is done with a locked table in order that no two clients can start work on the same item
    591591    '''
    592     def createNewBatch(self, batchType, stageID, survey, epoch, dvoDb, datastoreProduct, force):
     592    def createNewBatch(self, batchType, stageID, config):
    593593
    594594        batchID = -1;
    595595
    596         if force or \
    597             (not self.alreadyProcessed(batchType, stageID, epoch, dvoDb) \
    598             and not self.processingNow(batchType, stageID, epoch, dvoDb) \
    599             and not self.consistentlyFailed(batchType, stageID, epoch, dvoDb)):
     596        if config.force or \
     597            (not self.alreadyProcessed(batchType, stageID, config.epoch, config.dvoLabel) \
     598            and not self.processingNow(batchType, stageID, config.epoch, config.dvoLabel) \
     599            and not self.consistentlyFailed(batchType, stageID, config.epoch, config.dvoLabel)):
    600600
    601601            sql = "INSERT INTO batch ( \
     
    608608                       '" + batchType + "', \
    609609                       " + str(stageID) + ", \
    610                        '" + survey + "', \
    611                        '" + dvoDb + "', \
    612                        '" + datastoreProduct + "' \
     610                       '" + config.survey + "', \
     611                       '" + config.dvoLabel + "', \
     612                       '" + config.datastoreProduct + "' \
    613613                       )"
    614614
Note: See TracChangeset for help on using the changeset viewer.