fix(api): 修復 SentryService.check_dedup Redis import

- get_redis_pool → get_redis (正確函數名稱)
- Phase 10.2.1 E2E 測試發現

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-27 23:03:31 +08:00
parent 7456492482
commit 74734f5b8a

View File

@@ -211,15 +211,15 @@ class SentryService:
Returns:
bool: True = 應處理, False = 已去重跳過
"""
from src.core.redis_client import get_redis_pool
from src.core.redis_client import get_redis
if not issue_id:
return True
redis = await get_redis_pool()
redis = get_redis()
key = f"sentry_dedup:{issue_id}"
# 檢查是否已存在
# 檢查是否已存在 (redis-py async)
exists = await redis.exists(key)
if exists:
logger.info("sentry_dedup_hit", issue_id=issue_id)