refactor(tkeg): print→logging 교체 + 레거시 파일 정리 (-5,447줄)

- 6개 파일 디버그 print문 102건 → logger.info/warning/error 교체
- DashboardPage.old.jsx 삭제 (미사용)
- NewMaterialsPage.jsx/css 삭제 (dead import)
- spool_manager_v2.py 삭제 (미사용)
- App.jsx dead import 제거
- main.py 구 주석 블록 제거

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-26 15:41:39 +09:00
parent d6dd03a52f
commit 1ceeef2a65
12 changed files with 62 additions and 5447 deletions

View File

@@ -3,9 +3,12 @@
원본 설명에서 완전한 재질명을 추출하여 축약되지 않은 형태로 제공
"""
import logging
import re
from typing import Optional, Dict
logger = logging.getLogger(__name__)
def extract_full_material_grade(description: str) -> str:
"""
원본 설명에서 전체 재질명 추출
@@ -196,7 +199,7 @@ def update_full_material_grades(db, batch_size: int = 1000) -> Dict:
count_query = text("SELECT COUNT(*) FROM materials WHERE full_material_grade IS NULL OR full_material_grade = ''")
total_count = db.execute(count_query).scalar()
print(f"📊 업데이트 대상 자재: {total_count}")
logger.info(f"업데이트 대상 자재: {total_count}")
updated_count = 0
processed_count = 0
@@ -244,7 +247,7 @@ def update_full_material_grades(db, batch_size: int = 1000) -> Dict:
db.commit()
offset += batch_size
print(f"📈 진행률: {processed_count}/{total_count} ({processed_count/total_count*100:.1f}%)")
logger.info(f"진행률: {processed_count}/{total_count} ({processed_count/total_count*100:.1f}%)")
return {
"total_processed": processed_count,
@@ -254,7 +257,7 @@ def update_full_material_grades(db, batch_size: int = 1000) -> Dict:
except Exception as e:
db.rollback()
print(f"업데이트 실패: {str(e)}")
logger.error(f"업데이트 실패: {str(e)}")
return {
"total_processed": 0,
"updated_count": 0,