중복되는 삭제 로직 제거
This commit is contained in:
@ -105,22 +105,8 @@ def batch_process_files(table, engine):
|
|||||||
|
|
||||||
print(f"[INFO] {len(files)}개의 파일을 찾았습니다.")
|
print(f"[INFO] {len(files)}개의 파일을 찾았습니다.")
|
||||||
total_rows = 0
|
total_rows = 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] 처리된 전체 데이터 건수: {total_rows}")
|
||||||
print(f"[INFO] 삭제된 파일 수: {deleted_files}")
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run_pos_update():
|
def run_pos_update():
|
||||||
|
|||||||
Reference in New Issue
Block a user