class Omnisync(): def __init__(self, progress_callback): self.file_queue = FileQueue() self.watchers = [] for watch_config in config.data['watches']: if not watch_config.get('disabled'): self.watchers.append( FileWatcher(self.file_queue, watch_config)) self.sync_manager = SyncManager( self.file_queue, progress_callback=progress_callback) def stop(self): [w.stop() for w in self.watchers] self.sync_manager.stop()