파일 삭제는 다른곳에서 처리하도록 수정

This commit is contained in:
2025-10-27 15:06:22 +09:00
parent 7f371071f2
commit 1d6d697e58

View File

@ -94,22 +94,24 @@ def batch_process_files(table, engine):
print(f"[INFO] {len(files)}개의 파일을 찾았습니다.")
total_rows = 0
deleted_files = 0
# deleted_files = 0
for fname in files:
full_path = os.path.join(DATA_DIR, fname)
success, count = process_file(full_path, table, engine)
if success:
total_rows += count
"""
try:
os.remove(full_path)
print(f"[INFO] 파일 삭제 완료: {fname}")
deleted_files += 1
except Exception as e:
print(f"[WARN] 파일 삭제 실패: {fname} / {e}")
"""
print(f"[INFO] 총 처리 데이터 건수: {total_rows}")
print(f"[INFO] 삭제된 파일 수: {deleted_files}")
# print(f"[INFO] 삭제된 파일 수: {deleted_files}")
return True
def main():