def watch(site_config, base_path):
    global _site_config, _base_path
    _site_config = site_config
    _base_path = base_path

    observe_path = os.path.join(_base_path, _site_config['source'])
    event_handler = YAPatternMatchingEventHandler()
    observer = Observer()
    observer.schedule(event_handler, observe_path, recursive=True)
    observer.start()
    try:
        while True:
            time.sleep(1)
    except (__HOLE__, SystemExit):
        logging.info("Shutting down watcher")
        observer.stop()
    observer.join()
dataset/ETHPy150Open tankywoo/simiki/simiki/watcher.py/watch