[Update] agent 호출 구조 변경

This commit is contained in:
tv0924@icloud.com 2025-06-26 23:33:59 +09:00
commit b7e6afb227
12 changed files with 267 additions and 343 deletions

View file

@ -4,6 +4,26 @@ from pathlib import Path
progress_file = Path("data/scan_progress.json")
class ProgressChecker:
def __init__(self, filepath):
self.filepath = filepath
self.progress = self.load_progress()
def save(self):
"""현재 진행 상황을 파일에 저장"""
with open(self.filepath, 'w', encoding='utf-8') as f:
json.dump(self.progress, f, ensure_ascii=False, indent=2)
def load(self):
"""이전 진행 상황을 파일에서 불러오기"""
if os.path.exists(self.filepath):
try:
with open(self.filepath, 'r', encoding='utf-8') as f:
return json.load(f)
except:
return None
return None
def save_progress(current_progress):
"""현재 진행 상황을 파일에 저장"""