Ejemplo n.º 1
0
    def __init__(self, tq=None, pq=None):

        self.logger.debug("Initializing the controller...")
        Thread.__init__(self, name="CONTROLLER")

        self.tq = tq
        self.pq = pq

        self.scheduler = SynSched()
        self.locator = ResourceLocator(pq)
        self.alerter = AlertsController(self.locator, self.scheduler, pq)
        self.logger.debug("Controller successfully initialized.")
Ejemplo n.º 2
0
    def __init__(self, scheduler=None, tasks_queue=None, publish_queue=None):

        self.logger.debug("Initializing the controller...")
        Thread.__init__(self, name="CONTROLLER")
        permissions_path = config.controller['permissions_path']

        try:
            self.permissions = permissions.get(permissions_path)
        except (IOError, OSError) as err:
            self.logger.critical(err)
            raise SystemExit

        self.uuid = config.rabbitmq['uuid']
        self.tasks_queue = tasks_queue
        self.publish_queue = publish_queue
        self.locator = ResourceLocator(scheduler, publish_queue)
        self.logger.debug("Controller successfully initialized.")