Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)