Ejemplo n.º 1
0
    def __init__(self,
                 watch_manager,
                 default_proc_fun=None,
                 read_freq=0,
                 threshold=0,
                 timeout=None,
                 airtime_config=None,
                 api_client=None,
                 bootstrap=None,
                 mmc=None):
        Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
                          threshold, timeout)

        self.logger = logging.getLogger()
        self.config = airtime_config
        self.api_client = api_client
        self.bootstrap = bootstrap
        self.md_manager = AirtimeMetadata()
        self.import_processes = {}
        self.watched_folders = []
        self.mmc = mmc
        self.wm = watch_manager
        self.mask = pyinotify.ALL_EVENTS

        while not self.init_rabbit_mq():
            self.logger.error(
                "Error connecting to RabbitMQ Server. Trying again in few seconds"
            )
            time.sleep(5)
Ejemplo n.º 2
0
    def __init__(
        self,
        watch_manager,
        default_proc_fun=None,
        read_freq=0,
        threshold=0,
        timeout=None,
        airtime_config=None,
        api_client=None,
        bootstrap=None,
        mmc=None,
    ):
        Notifier.__init__(self, watch_manager, default_proc_fun, read_freq, threshold, timeout)

        self.logger = logging.getLogger()
        self.config = airtime_config
        self.api_client = api_client
        self.bootstrap = bootstrap
        self.md_manager = AirtimeMetadata()
        self.import_processes = {}
        self.watched_folders = []
        self.mmc = mmc
        self.wm = watch_manager
        self.mask = pyinotify.ALL_EVENTS

        while not self.init_rabbit_mq():
            self.logger.error("Error connecting to RabbitMQ Server. Trying again in few seconds")
            time.sleep(5)