[ICC-220] 환경변수를 없애고 스레드 관점에서 타임아웃으로 조정#91
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR refactors request handling to introduce explicit timeout parameters across batch and single request processing. Batch requests now support partial completion via Changes
Sequence DiagramsequenceDiagram
actor Client
participant BatchProc as Batch Processor
participant TaskMgr as asyncio.wait
participant Tasks as Concurrent Tasks
participant OpenAI as OpenAI API
Client->>BatchProc: request_text_batch(..., timeout=30s)
BatchProc->>Tasks: create_task() for each request
rect rgb(240, 248, 255)
note over TaskMgr,Tasks: New: asyncio.wait with timeout
TaskProc->>TaskMgr: wait(tasks, timeout=30s)
par Parallel execution
Tasks->>OpenAI: API call 1
Tasks->>OpenAI: API call 2
Tasks->>OpenAI: API call N
and Timeout monitoring
TaskMgr->>TaskMgr: Check elapsed time
end
end
alt Timeout occurs
TaskMgr->>Tasks: Cancel unfinished tasks
Tasks-->>TaskMgr: Cancelled
note over BatchProc: Return None for incomplete tasks
else All complete within timeout
OpenAI-->>Tasks: Results
Tasks-->>TaskMgr: Done
end
TaskMgr-->>BatchProc: (done, pending)
BatchProc-->>Client: [result1, None, result3, ...]
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📢 설명
해당 Pull Request에 대해 간략하게 설명해주세요!
✅ 체크 리스트
Summary by CodeRabbit
Release Notes
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.