예제 #1
0
 def __init__(self):
     """
     Initialise the slave
     """
     ThreadSlave.__init__(self)
     myThread = threading.currentThread()
     self.runningFeedersLock = myThread.runningFeedersLock
     self.runningFeeders = myThread.runningFeeders
     self.messageArgs = None
예제 #2
0
    def initInThread(self):
        """
        Load shared queries
        """
        # Call superclass setup
        ThreadSlave.initInThread(self)

        # Load DB queries
        myThread = threading.currentThread()
        daofactory = DAOFactory(package = "WMComponent.WorkflowManager.Database" , \
              logger = myThread.logger, \
              dbinterface = myThread.dbi)

        self.addManagedWorkflow = daofactory(classname = "AddManagedWorkflow")
        self.markLocation = daofactory(classname = "MarkLocation")
        self.unmarkLocation = daofactory(classname = "UnmarkLocation")
        self.removeManagedWorkflow = daofactory(classname = "RemoveManagedWorkflow")
예제 #3
0
    def initInThread(self):
        """
        Called during thread initialization. Loads the
        backend for this instance.
        """
        # make sure you instantiate the super class method.
        ThreadSlave.initInThread(self)
        
        # load queries for backend.
        myThread = threading.currentThread()
        factory = WMFactory("default", \
           "TQComp.Database."+myThread.dialect)
        # make sure you do not overload attributes
        # defined in your parent class
        self.queries = factory.loadObject("Queries")

        logging.debug("ParentSlave initialized")
예제 #4
0
    def initInThread(self):
        """
        Load shared queries
        """
        # Call parent initialisation
        ThreadSlave.initInThread(self)

        myThread = threading.currentThread()

        daofactory = DAOFactory(package = "WMComponent.FeederManager.Database" , \
              logger = myThread.logger, \
              dbinterface = myThread.dbi)

        # Load queries objects
        self.checkFeeder = daofactory(classname = "CheckFeeder")
        self.getFeederId = daofactory(classname = "GetFeederId")
        self.addFeeder = daofactory(classname = "AddFeeder")
        self.addFilesetToManage = daofactory(classname = "AddFilesetToManage")

        # Get feeder objects
        myThread.runningFeedersLock = self.runningFeedersLock
        myThread.runningFeeders = self.runningFeeders
예제 #5
0
 def __init__(self):
     """
     Setup the slave data members
     """
     ThreadSlave.__init__(self)
     self.messageArgs = None
예제 #6
0
 def __init__(self):
     ThreadSlave.__init__(self)