status)updown, 일부 updown개별 서비스가 boolean 만 반환 → 통합 서비스에서 "up"/"down" 변환
통합 헬스 체크 service - up/down
코드흐름
[Controller]
|
| (GET /v1/system/health)
v
[SystemHealthService] ← 통합 서비스
|
|--- 호출 ---> [DatabaseHealthCheckService] → "up"/"down"
|
|--- 호출 ---> [LLMHealthCheckService] → "up"/"down"
|
|--- 호출 ---> [CrawlerHealthCheckService] → "up"/"down"
|
|--- 호출 ---> [SchedulerHealthCheckService] → "up"/"down"
|
v
집계 로직 (aggregateStatus)
|
├─ 모두 up → status = "healthy"
├─ 일부 down → status = "degraded"
└─ 모두 down → status = "unhealthy"
|
v
[DTO 생성] → { status, services }
|
v
[Controller 응답] → JSON 반환
COUNT(*) → totalUsersCOUNT(*) WHERE is_active='Y' → activeSchedulesCOUNT(*) → totalKeywordsCOUNT(*) WHERE status='PUBLISHED' → publishedContent/v1/system/health API 호출 결과 활용 → systemStatusCOUNT(*) → totalContentCOUNT(*) WHERE status='PUBLISHED' → publishedContent~~totalViews, totalLikes, conversionRate (조회수/좋아요 데이터가 없다면 로그 기반 집계 필요)~~AI_GENERATED_CONTENT, BLOG_PUBLISH_LOGS):recentActivity 채움log_message, status_code, created_at 활용log_id → idlog_level → levellog_message → messagelog_type (또는 step_code) → modulecreated_at → timestamplog_detail (JSON) → detailsROWNUM, OFFSET/FETCH 쿼리 활용keep
problem
Try