From f5c73704efe35fa45953b0a8c3c1fcefaf990c3a Mon Sep 17 00:00:00 2001 From: happybell80 Date: Tue, 16 Sep 2025 01:48:41 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20rb8001=20=EB=B9=84=EB=8F=99=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=91=EB=A0=AC=20=ED=8C=8C=EC=9D=BC=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EB=AC=B8=EC=84=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Semaphore를 이용한 동시 처리 제한 (3개) - asyncio.gather로 병렬 처리 구현 - 파일 크기에 관계없이 독립적 처리 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../250916_rb8001_skill-rag-file_연동_구조.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md b/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md index 5d4123a..01032f2 100644 --- a/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md +++ b/troubleshooting/250916_rb8001_skill-rag-file_연동_구조.md @@ -135,4 +135,13 @@ metadata, created_at, updated_at - DB 저장: team_document 테이블 ID: 733c7c2a-09ad-47a2-b005-abb30bc427d0 - ChromaDB: rb8001_38bdc27d-cb01-4960-867e-41733d2f3529_documents 컬렉션 생성 - 1개 청크 처리 -- API 응답: 200 OK \ No newline at end of file +- API 응답: 200 OK + +### 비동기 병렬 처리 구현 (2025-09-16) +- **문제**: 큰 파일(XLSX 10분) 처리 중 작은 파일(PDF) 대기 +- **해결**: asyncio.Semaphore(3)로 최대 3개 동시 처리 +- **구현**: + - process_single_file() 함수로 개별 파일 처리 분리 + - asyncio.gather()로 모든 파일 병렬 처리 + - 각 파일이 독립적으로 처리되어 작은 파일 빠른 응답 +- **결과**: 전체 처리 시간 단축, 사용자 경험 개선 \ No newline at end of file