Repository navigation
feat: 복지서비스 수집을 최초 기동 시 1회 실행 - #143
Merged
Merged
Conversation
스케줄러는 매월 1일에만 돌아서, 배포 직후엔 지원금 화면이 DEMO 시드만 있는 빈 상태였다. ApplicationReadyEvent에서 자동 수집 이력이 없으면(= 한 번도 안 돌았으면) 한 번 돌린다. - WELFARE_API_KEY 없으면 건너뜀 (CI·로컬 기본) - API_CANDIDATE 행이 이미 있으면 건너뜀 (재배포마다 외부 API 안 때림) - 기동을 막지 않게 데몬 스레드에서 실행. 실패해도 launcher가 삼키므로 다음 기동 때 자동 재시도 spring.batch.job.enabled=false는 유지 — "등록된 잡 전부 실행"은 여전히 위험. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks done
horisomebody
added a commit
that referenced
this pull request
Sep 9, 2026
운영에 WELFARE_API_KEY가 없어 수집이 안 돌던 동안 시연용으로 넣었던 DEMO-0001~6. 이제 수집 배치가 최초 기동 시(#143) + 매월 1일 돌아 실데이터가 채워지므로, 이 시드는 실제 제도와 의미상 중복만 만든다 (예: DEMO-0001 자립수당 ↔ 수집된 WLF00001175 자립준비청년 자립수당 지급).⚠️ 이 파일은 INSERT만 하므로, 이미 RDS/로컬 DB에 들어간 DEMO-* 6행은 별도로 지워야 한다: DELETE FROM user_program_eligibility WHERE program_id LIKE 'DEMO-%'; DELETE FROM user_program_status WHERE program_id LIKE 'DEMO-%'; DELETE FROM welfare_program WHERE serv_id LIKE 'DEMO-%'; Co-authored-by: gene <genejichoong@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
관련 이슈
작업 내용
WelfareCollectScheduler가 매월 1일 00:00 KST에만 돌아서, 배포 직후엔welfare_program이DEMO-*시드만 있는 빈 상태였다. 다음 달 1일까지 기다려야 실데이터가 채워짐.ApplicationReadyEvent에서 자동 수집 이력이 하나도 없으면 최초 1회 수집을 돌린다.WelfareCollectBootstrap(신규)existsBySource(API_CANDIDATE)—DEMO-*시드는MANUAL_CURATION이라 안 잡힘 → "진짜 수집이 한 번이라도 돌았나" 판단WelfareCollectLauncher가 예외를 삼키므로, 다음 기동 때 이력이 여전히 없어 자동 재시도그 외
WelfareProgramRepository.existsBySource(ProgramSource)추가spring.batch.job.enabled=false는 유지 — "등록된 잡 전부 기동 시 실행"은 여전히 위험. 이건 그것과 별개로 조건부 1회만.application.yml,WelfareCollectScheduler)확인한 것
./gradlew build통과WelfareCollectBootstrapTest3케이스 (키 없음 / 이미 수집됨 / 최초 실행)DdayApplicationTests컨텍스트 로딩 통과 (테스트엔 키 없어 건너뜀)리뷰어에게
WELFARE_API_KEY가 운영에 설정돼 있어야 실제로 동작함 (별도 PR chore: 배포 시 WELFARE_API_KEY를 서버 .env에 반영 #142 + 리포 Secret).🤖 Generated with Claude Code