Skip to content

feat: TimePoll 스케줄러 구현 (집계/독촉/최후통첩/자동확정) (#31)#33

Merged
hayeon7898 merged 1 commit intodevfrom
feature/#31
Feb 6, 2026
Merged

feat: TimePoll 스케줄러 구현 (집계/독촉/최후통첩/자동확정) (#31)#33
hayeon7898 merged 1 commit intodevfrom
feature/#31

Conversation

@hayeon7898
Copy link
Copy Markdown
Collaborator

TimePoll 스케줄러 구현 (집계/독촉/최후통첩/자동확정)

동작 방식

1분 주기로 DB를 폴링하여, 진행 중인 시간 투표의 경과 시간에 따라 메시지를 트리거합니다. lastReminderStep으로 각 투표의 독촉 진행 단계를 추적하여 중복 발송을 방지합니다.

스케줄 기준

경과 시간 유형 step 조건
~3분 조기 집계 0→1 과반 이상 투표 시에만
3분 집계 0→1 투표자 0명이면 "아무도 안 했네요" 분기
30분 독촉 1차 →2 미투표자 멘션
2시간 독촉 2차 →3 미투표자 멘션
6시간 독촉 3차 →4 톤 변경
12시간 독촉 4차 →5 톤 변경
24시간 최후통첩 →6 ONGOING → ULTIMATUM 상태 전환
최후통첩 +60분 자동 확정 - ULTIMATUM → FINALIZED

메시지 발송 관련 (TODO)

현재 모든 메시지는 log.info로만 출력됩니다. 실제 카카오톡 챗봇 메시지 발송으로 대체해야 합니다.

코드 내 // TODO: send chatbot message 주석이 있는 위치:

  • sendAggregateMessage() — 집계 현황 메시지
  • sendReminderMessage() — 독촉 메시지 (단계별 템플릿 적용)
  • sendUltimatumMessage() — 최후통첩 메시지 (버튼 포함)
  • processAutoFinalize() — 자동 확정 통보 메시지

@hayeon7898 hayeon7898 merged commit 4f60205 into dev Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant