def event_loop(): observer = Observer() event_handler = FileEventHandler(system_config, "model", interface_manager) observer.schedule(event_handler, event_handler.model_conf_path, True) observer.start() try: while True: time.sleep(1) except KeyboardInterrupt: observer.stop() observer.join()
def event_loop(): event = threading.Event() observer = Observer() event_handler = FileEventHandler(system_config, model_path, interface_manager) observer.schedule(event_handler, event_handler.model_conf_path, True) observer.start() try: while True: event.wait(1) except KeyboardInterrupt: observer.stop() observer.join()