Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates maintenance tasks, such as stale job reconciliation and refresh token cleanup, from internal @scheduled annotations to direct AWS Lambda invocations triggered by EventBridge Scheduler. The implementation introduces a MaintenanceTaskHandler to route these events and updates StreamLambdaHandler to distinguish between HTTP and maintenance payloads. Review feedback identifies a potential compilation error regarding Jackson's JsonNode API, suggests optimizing JSON parsing to avoid redundant processing, and recommends using a static map for more efficient enum lookups.
hoooonshub
left a comment
There was a problem hiding this comment.
확인했어!
핸들러 분리하는 것보다 하나의 핸들러에서 아예 분기되는 게 더 단순하고 편하다고 판단해서 하나의 핸들러에서 http랑 schedular 처리 다 하는거야?
네 맞아요 |
참고 사항
백엔드 Lambda 내부
@Scheduled유지보수 작업을 EventBridge Scheduler direct invoke 방식으로 전환하기 위한 백엔드 코드 변경입니다.주요 변경 사항:
StreamLambdaHandler에서 감지해 maintenance task로 분기SCRAPE_JOB_RECONCILE_STALE,REFRESH_TOKEN_CLEANUPtask 라우팅 추가@Scheduled의존 제거scraping.scheduler.enabled기본값을false로 변경검증:
./gradlew test./gradlew build인프라 후속 작업:
SCRAPING_SCHEDULER_ENABLED=false명시🔗 Related Issue
Closes #221