Пример #1
0
    def __init__(self, config, webApp=None, testName=""):
        """
        Initialise the object, pull out the necessary pieces of the configuration
        """
        self.homepage = None
        self.mode = 'component'
        self.testName = testName
        if webApp is None:
            Harness.__init__(self, config, compName="Webtools")
            self.appconfig = config.section_(self.config.Webtools.application)
            self.app = self.config.Webtools.application
            self.secconfig = config.component_("SecurityModule")
            self.serverConfig = config.section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")
            self.mode = 'standalone'
        else:
            Harness.__init__(self, config, compName=webApp)
            self.appconfig = config.section_(webApp)
            WMCore.WMLogging.setupRotatingHandler(
                os.path.join(self.appconfig.componentDir, "%s.log" % webApp))
            self.app = webApp
            self.secconfig = getattr(self.appconfig, "security")
            self.serverConfig = config.section_(webApp).section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")

        return
Пример #2
0
    def __init__(self, config, webApp=None, testName=""):
        """
        Initialise the object, pull out the necessary pieces of the configuration
        """
        self.homepage = None
        self.mode = 'component'
        self.testName = testName
        if webApp is None:
            Harness.__init__(self, config, compName="Webtools")
            self.appconfig = config.section_(self.config.Webtools.application)
            self.app = self.config.Webtools.application
            self.secconfig = config.component_("SecurityModule")
            self.serverConfig = config.section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")
            self.mode = 'standalone'
        else:
            Harness.__init__(self, config, compName=webApp)
            self.appconfig = config.section_(webApp)
            WMCore.WMLogging.setupRotatingHandler(os.path.join(self.appconfig.componentDir, "%s.log" % webApp))
            self.app = webApp
            self.secconfig = getattr(self.appconfig, "security")
            self.serverConfig = config.section_(webApp).section_("Webtools")
            self.coreDatabase = config.section_("CoreDatabase")

        return
Пример #3
0
    def __init__(self, config):
        """
        __init__

        Initialize the Harness
        """
        Harness.__init__(self, config)
Пример #4
0
    def __init__(self, config):
        """
        __init__

        Initialize the Harness
        """
        Harness.__init__(self, config)
Пример #5
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print "TaskArchiver.__init__"
 def __init__(self, config):
     Harness.__init__(self, config)
     logging.info("%s initializing ... " % self.__class__.__name__)
     self.config = config                
     # poller instances (threads)
     self._pollers = []
     self._createPollers()
     logging.info("%s initialized." % self.__class__.__name__)
 def prepareToStop(self, wait = False, stopPayload = ""):
     """
     Override prepareToStop to include call to stopProcessor.
     Ugly, but seems no other way to do this...
     
     """
     self.stopProcessor()
     Harness.prepareToStop(self, wait, stopPayload)
Пример #8
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print("JobTracker.__init__")
Пример #9
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print "TaskArchiver.__init__"
Пример #10
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        self.config = config

        print("JobTracker.__init__")
Пример #11
0
    def prepareToStop(self, wait = False, stopPayload = ""):
        """
        _stopComponent

        Completing default behaviour of Harness class. Stopping the 
        listener previously.
        """
        self.listener.__del__()
        Harness.prepareToStop(self, wait, stopPayload)
Пример #12
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)

        self.config = config
        #self.config.JobStatusLite.pollInterval
        #self.config.JobStatusLite.queryInterval

        print("JobStatusLite.__init__")
Пример #13
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)

        self.config = config
        #self.config.JobStatusLite.pollInterval
        #self.config.JobStatusLite.queryInterval
        
        print "JobStatusLite.__init__"
Пример #14
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        #myThread = threading.currentThread()
        #myThread.database = os.getenv("DATABASE")

        print "JobCreator.__init__"
Пример #15
0
    def prepareToStop(self, wait = False, stopPayload = ""):
        """
        Override prepareToStop to include call to stopAlertGenerator.
        Ugly, but seems no other way to do this...

        """
        logging.info("Shutting down the component - prepareToStop ...")
        self.stopAlertGenerator()
        Harness.prepareToStop(self, wait, stopPayload)
        logging.info("prepareToStop finished.")
Пример #16
0
 def __init__(self, config):
     Harness.__init__(self, config)
     logging.info("%s initializing ... " % self.__class__.__name__)
     self.config = config                
     # poller instances, its poll() will run as a background process
     self._pollers = []
     # polling processes
     self._procs = []
     self._createPollers()
     logging.info("%s initialized." % self.__class__.__name__)
 def __init__(self, config):
     Harness.__init__(self, config)
     self._myName = self.__class__.__name__
     self.config = config
     # instance of processor
     self._processor = None
     # instance of Receiver which owns Processor (self._processor) 
     # and runs on background
     self._receiver = None
     logging.info("%s initialized." % self._myName)
Пример #18
0
 def __init__(self, config):
     Harness.__init__(self, config)
     self.config = config
     # poller instances (threads)
     self._pollers = []
     #3602 related:
     # Harness, nor the components, handle signal.SIGTERM which
     # is used by wmcoreD --shutdown, hence shutdown sequence is not called
     # this shall later be moved into (hopefully largely improved) Harness
     signal.signal(signal.SIGTERM, self._signalHandler)
Пример #19
0
    def prepareToStop(self, wait=False, stopPayload=""):
        """
        Override prepareToStop to include call to stopAlertGenerator.
        Ugly, but seems no other way to do this...

        """
        logging.info("Shutting down the component - prepareToStop ...")
        self.stopAlertGenerator()
        Harness.prepareToStop(self, wait, stopPayload)
        logging.info("prepareToStop finished.")
Пример #20
0
 def __init__(self, config):
     Harness.__init__(self, config)
     self.config = config
     # poller instances (threads)
     self._pollers = []
     #3602 related:
     # Harness, nor the components, handle signal.SIGTERM which
     # is used by wmcoreD --shutdown, hence shutdown sequence is not called
     # this shall later be moved into (hopefully largely improved) Harness
     signal.signal(signal.SIGTERM, self._signalHandler)
Пример #21
0
 def __init__(self, config):
     Harness.__init__(self, config)
     self.config = config
     # instance of processor
     self._processor = None
     # instance of Receiver which owns Processor (self._processor)
     # and runs on background
     self._receiver = None
     #3602 related:
     # Harness, nor the components, handle signal.SIGTERM which
     # is used by wmcoreD --shutdown, hence shutdown sequence is not called
     # this shall later be moved into (hopefully largely improved) Harness
     signal.signal(signal.SIGTERM, self._signalHandler)
Пример #22
0
 def __init__(self, config):
     """
     Constructor. Passes config to its parent WMCore.Agent.Harness.
     It also checks that some required configuration options are 
     present:
       downloadBaseUrl, sandboxBasePath, specBasePath, reportBasePath,
       pilotErrorLogPath
     """
     print "Starting TQComp..."
     Harness.__init__(self, config)
     print (config)
     
     required = ["downloadBaseUrl", "sandboxBasePath", \
                 "specBasePath", "reportBasePath", "pilotErrorLogPath"]
     for param in required:
         if not hasattr(self.config.TQComp, param):
             messg = "%s required in TQComp configuration" % param
             # TODO: What number?
             numb = 0
             raise WMException(messg, numb)
Пример #23
0
    def __init__(self, config):
        """ 
        __init__ 
        """

        self.jobavaliableflag = False
        self.tarPath = config.PilotManagerComponent.tarPath
        self.pilotcodeDir = config.PilotManagerComponent.pilotCode 
        self.tqServer = config.PilotManagerComponent.tqAddress
        self.emulationMode = config.PilotManagerComponent.emulationMode
        self.pilotParams = None
        try:
            cfg = loadProdAgentConfiguration()
            pilot = cfg.getConfig("Pilot")
            self.pilotParams = pilot
        except:
            logging.debug("could not load PRODAGENT_CONFIG file")
        if ( not self.pilotParams ):
            self.pilotParams={'badAttempts':6,'noTaskAttempts':6}

        Harness.__init__(self, config)
Пример #24
0
    def __init__(self, config):
	# call the base class
	Harness.__init__(self, config)
	self.pollTime = 1
	print "DBS Migration Service Initialization"
Пример #25
0
 def __init__(self, config):
     Harness.__init__(self, config)
     if ( not hasattr(self.config.PilotMonitorComponent,"pollInterval" ) ):
         self.pollInterval = "00:20:00"
     else:
         self.pollInterval = self.config.PilotMonitorComponent.pollInterval
Пример #26
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        print "Tier0Auditor.__init__"
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("AsyncTransfer.__init__")
Пример #28
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
	print "DBSBuffer.__init__"
Пример #29
0
 def __init__(self, config):
     Harness.__init__(self, config)
     return
Пример #30
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     self.pollTime = 1
     print "DBS3Upload.__init__"
Пример #31
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("FilesCleaner.__init__")
Пример #32
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     self.config = queueConfigFromConfigObject(config)
Пример #33
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("Reporter.__init__")
Пример #34
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        logging.info("JobSubmitter.__init__")
Пример #35
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        print("Tier0Feeder.__init__")
Пример #36
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("Reporter.__init__")
Пример #37
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
Пример #38
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     print "JobMaker.__init__"
Пример #39
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     self.pollTime = 1
     print "DBSUpload.__init__"
Пример #40
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("Statistics.__init__")
Пример #41
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        logging.info("JobSubmitter.__init__")
Пример #42
0
    def __init__(self, config):
        # call the base class
        Harness.__init__(self, config)
        self.pollTime = 1

        print("Tier0Feeder.__init__")
Пример #43
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("DBSPublisher.__init__")
Пример #45
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("AsyncTransfer.__init__")
Пример #46
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     self.config = queueConfigFromConfigObject(config)
Пример #47
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("Statistics.__init__")
Пример #48
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     logging.info("DBSPublisher.__init__")
Пример #49
0
 def __init__(self, config):
     Harness.__init__(self, config)
     return
Пример #50
0
 def __init__(self, config):
     # call the base class
     Harness.__init__(self, config)
     print "JobMaker.__init__"