def start(self):

        self.log.info("Refreshing existing files.")
        for root, dirs, files in os.walk(self.data_dir):
            for filename in files:
                self._maybe_queue_file(os.path.join(root, filename),
                    enqueue=not(self.ignore_existing))

        # watch if configured
        if self.ignore_changes:
            return 

        observer = observers.Observer()
        observer.schedule(self, path=self.data_dir, recursive=True)
        self.log.info("Watching for new file under %s", self.data_dir)

        observer.start()
        try:
            while True:
                time.sleep(1)
        except __HOLE__:
            observer.stop()
        observer.join(timeout=30)
        if observer.isAlive():
            self.log.error("Watchdog Observer failed to stop. Aborting.")
            os.kill(os.getpid(), signal.SIGKILL)
        return
dataset/ETHPy150Open amorton/cassback/cassback/subcommands/backup_subcommand.py/WatchdogWatcher.start