Repository navigation
fix: 올리브영 브라우저 준비 중 조회 만료 방지 - #208
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
올리브영 재고 조회가 매장 검색과 상품 검색을 동시에 요청할 때, 첫 매장 검색의 브라우저 준비가 35초 걸리면 뒤따른 상품 검색이 30초 대기 상한에 걸려 503을 반환했습니다. 대기 상한을 40초로 조정해 이 경우 두 조회가 모두 실행되도록 합니다.
두 만료 검사에 같은 상수를 사용하며 취소, 슬롯 8개, 소비자·분당·일일 상한, 직렬 실행과 캐시는 유지합니다. 준비된 세션의 대기40초와 API watchdog18초를 Worker 기본60초 예산 안에 배치하는 목표이며, 추가 브라우저 준비·회수까지 포함한 전체 응답시간 보장은 아닙니다. 인증/준비 실패는 성공이나 재고0으로 처리하지 않습니다.
검증:
운영 Mac의 기존 중계에는 이 스크립트 하나만 백업·원자적 교체 후 정상 종료/재기동으로 반영했습니다. 재기동 후 ready/pages1 상태와 공개 REST에서 강남 수분크림3.3초·명동 핸드크림2.15초, 각 stockCheckedCount1/stockUncheckedCount0의200 응답을 확인했습니다. Worker 배포와 npm 버전 변경은 필요하지 않습니다. 다이소·CU·세븐일레븐·GS25의 별도 재고 점검은 이 코드 변경에 포함하지 않습니다.