def __init__(self, frequency=1, match=None): ''' :param frequency: How often to perform file modification checks :type frequency: int :param match: Only check modules matching this regular expression. Matches anything if None. :type match: re.RegExp ''' self.config_files = set() self.mtimes = {} self.log = None # in runner thread -- should not be set manually self.match = match Monitor.__init__(self, self.run, self.setup, frequency)
def start(self): '''Start our own perpetual timer thread for self.run.''' if self.thread is None: self.mtimes = {} self._update_config_files_list() Monitor.start(self)