diff --git a/lib/file_watch.py b/lib/file_watch.py index c55be77..4fc7ba6 100644 --- a/lib/file_watch.py +++ b/lib/file_watch.py @@ -5,13 +5,13 @@ from watchdog.events import FileSystemEventHandler import threading import pos_update_bill -import pos_update_gui # 추가 +import pos_update_daily_product DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../data')) FILE_EXTENSIONS = ('.xls', '.xlsx') BILL_PREFIX = "영수증별매출상세현황" -GUI_PREFIX = "일자별 (상품별)" +DAILY_PRODUCT_PREFIX = "일자별 (상품별)" class NewFileHandler(FileSystemEventHandler): def __init__(self): @@ -28,7 +28,7 @@ class NewFileHandler(FileSystemEventHandler): return # 처리 대상 여부 확인 - if filename.startswith(BILL_PREFIX) or filename.startswith(GUI_PREFIX): + if filename.startswith(BILL_PREFIX) or filename.startswith(DAILY_PRODUCT_PREFIX): print(f"[WATCHER] 신규 파일 감지: {filename}") threading.Thread(target=self.process_file, args=(filepath, filename), daemon=True).start() @@ -45,8 +45,8 @@ class NewFileHandler(FileSystemEventHandler): print(f"[WATCHER] 파일 처리 시작: {filename}") if filename.startswith(BILL_PREFIX): pos_update_bill.main() - elif filename.startswith(GUI_PREFIX): - pos_update_gui.main() + elif filename.startswith(DAILY_PRODUCT_PREFIX): + pos_update_daily_product.main() else: print(f"[WATCHER] 처리 대상이 아님: {filename}") return diff --git a/lib/pos_update_gui.py b/lib/pos_update_daily_product.py similarity index 100% rename from lib/pos_update_gui.py rename to lib/pos_update_daily_product.py