Skip to content

[FEAT] ChatScheduler, UserChatScheduler에 ShedLock 적용#93

Merged
soomin0209 merged 1 commit into
devfrom
feature/chat-scheduler
May 14, 2026
Merged

[FEAT] ChatScheduler, UserChatScheduler에 ShedLock 적용#93
soomin0209 merged 1 commit into
devfrom
feature/chat-scheduler

Conversation

@soomin0209

@soomin0209 soomin0209 commented May 14, 2026

Copy link
Copy Markdown
Contributor

📝 작업 내용

  • 30일 이전 메시지 삭제 스케줄러(ChatScheduler, UserChatScheduler)에 ShedLock 적용

✅ 체크리스트 (Checklist)

  • 브랜치 이름 규칙을 준수했나요? (예: feat/login)
  • 코딩 컨벤션을 준수했나요?
  • 기능에 대한 테스트 코드를 작성/수행했나요?
  • 불필요한 주석이나 로그(console.log)를 제거했나요?

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 분산 환경에서 스케줄된 메시지 정리 작업이 여러 인스턴스에서 동시에 실행되어 발생하는 중복 처리 문제를 해결했습니다. 이제 클러스터 환경에서도 안정적으로 메시지 정리가 수행됩니다.

Review Change Stack

@soomin0209 soomin0209 added the enhancement New feature or request label May 14, 2026
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7ab6d529-7d44-4d94-a4d7-8ff63dbfe167

📥 Commits

Reviewing files that changed from the base of the PR and between eb5eae4 and e2e07d3.

📒 Files selected for processing (2)
  • src/main/java/com/example/auction/domain/chat/scheduler/ChatScheduler.java
  • src/main/java/com/example/auction/domain/userchat/scheduler/UserChatScheduler.java

Walkthrough

두 스케줄러 클래스(ChatScheduler, UserChatScheduler)에 ShedLock 분산 잠금 기능이 추가되었습니다. 각 클래스의 scheduled message deletion 메서드에 @SchedulerLock 어노테이션이 적용되어 다중 인스턴스 환경에서 동시 실행을 방지합니다.

Changes

스케줄된 메시지 삭제 작업의 분산 잠금 보호

계층 / 파일 요약
ChatScheduler 및 UserChatScheduler에 ShedLock 적용
src/main/java/com/example/auction/domain/chat/scheduler/ChatScheduler.java, src/main/java/com/example/auction/domain/userchat/scheduler/UserChatScheduler.java
두 스케줄러 클래스가 각각 ShedLock import를 추가하고 deleteOldMessages() 메서드에 @SchedulerLock(lockAtMostFor = PT10M, lockAtLeastFor = PT1M) 어노테이션을 적용하여 분산 환경에서 메시지 정리 작업의 중복 실행을 방지합니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 변경 사항의 핵심을 명확하게 반영하고 있습니다. ChatScheduler와 UserChatScheduler에 ShedLock을 적용한 주요 변경 내용을 간결하게 설명합니다.
Description check ✅ Passed 설명이 작업 내용을 명확히 기술하고 있으며, 제공된 템플릿의 필수 섹션인 '작업 내용'과 '체크리스트'를 완성했습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/chat-scheduler

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@imprity imprity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hhjo96 hhjo96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@soomin0209 soomin0209 merged commit fc9d932 into dev May 14, 2026
2 checks passed
@soomin0209 soomin0209 deleted the feature/chat-scheduler branch May 14, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants