From d890e32a0d71876286f89d07714c5f553b89c91a Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 15 Sep 2025 19:55:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20rb8001=20stats=20API=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EC=82=AC=EC=8B=A4=20=EA=B2=80=EC=A6=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rb8001과 rb10408_test 에러 메시지 구분 명시 - router.py 162줄은 주석만 존재 (호출 코드 없음) - 확인된 사실만 기록, 추측 제거 --- ...pybell80_rb8001_stats_api_중복_제거.md | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/troubleshooting/250915_happybell80_rb8001_stats_api_중복_제거.md b/troubleshooting/250915_happybell80_rb8001_stats_api_중복_제거.md index 9eba18e..ea531ed 100644 --- a/troubleshooting/250915_happybell80_rb8001_stats_api_중복_제거.md +++ b/troubleshooting/250915_happybell80_rb8001_stats_api_중복_제거.md @@ -9,10 +9,13 @@ ## 현재 상황 ### 에러 메시지 -- **발생 위치**: rb8001 brain_service.py -- **에러**: `Failed to fetch stats: {e}` -- **파일**: `/home/happybell/projects/ivada/rb8001/app/brain/brain_service.py:56` -- **참고**: router.py의 `_load_stats_from_state()` 호출은 이미 제거됨 +- **rb8001 에러**: `Failed to fetch stats: {e}` + - 파일: `/home/happybell/projects/ivada/rb8001/app/brain/brain_service.py:56` +- **rb10408_test 에러**: `Failed to load stats: {e}` + - 파일: `/home/happybell/projects/ivada/rb10408_test/app/router/router.py:70` +- **rb8001 router.py 현재 상태**: + - 80-82줄: `_load_stats_from_state()` 함수 본문이 `pass`로만 구성 + - 162줄: 주석 `# 1. 스탯 로드 - 제거됨 (robeing-monitor가 담당)` ### Stats API 엔드포인트 현황 @@ -57,7 +60,13 @@ - **config.py:51**: `STATE_SERVICE_URL: Optional[str] = None` - **state_client.py:17**: `os.getenv('STATE_SERVICE_URL', 'http://localhost:8507')` -### 확인된 문제 -1. robeing-monitor 경로: `/stats/{id}` vs gateway 프록시: `/api/stats/{id}` 불일치 -2. DB 스키마 차이: rb8001은 `robeing_id`, monitor는 `robeing_container_id` -3. 필드 차이: rb8001은 `ethics`, `stat_points` 있음, monitor는 없음 \ No newline at end of file +### 확인된 사실 +1. **경로 불일치**: + - robeing-monitor 실제 엔드포인트: `/stats/{robeing_id}` + - robeing-gateway 프록시 대상: `/api/stats/{robeing_id}` +2. **DB 스키마 차이**: + - rb8001 RobeingStats: `robeing_id` 필드 사용 + - robeing-monitor RobeingStats: `robeing_container_id` 필드 사용 +3. **필드 차이**: + - rb8001: `ethics`, `stat_points` 필드 존재 + - robeing-monitor: 해당 필드 없음 \ No newline at end of file