refactor: 쿼리 생명주기 관리를 서비스 finally 블록으로 단일화
Phase 2.2: 쿼리 관리 시스템 통합 - StompTrackController의 status callback에서 activeQueryManager.completeQuery() 제거 - 리소스 정리를 서비스(ChunkedTrack/StompTrack) finally 블록에서 일괄 처리 - 중복 completeQuery 호출 제거로 쿼리 생명주기 관리 단일화 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
부모
e073007dc2
커밋
28908e1a0d
@ -71,13 +71,8 @@ public class StompTrackController {
|
||||
queryId,
|
||||
sessionId, // sessionId 전달 (연결 끊김 감지용)
|
||||
chunk -> sendChunkedDataToUser(userId, chunk),
|
||||
status -> {
|
||||
sendStatusToUser(userId, status);
|
||||
// 완료 시 쿼리 등록 제거
|
||||
if ("COMPLETED".equals(status.getStatus()) || "FAILED".equals(status.getStatus())) {
|
||||
activeQueryManager.completeQuery(sessionId);
|
||||
}
|
||||
}
|
||||
// 리소스 정리는 서비스 finally 블록에서 일괄 처리
|
||||
status -> sendStatusToUser(userId, status)
|
||||
);
|
||||
} else {
|
||||
// 기존 스트리밍 모드
|
||||
@ -86,13 +81,8 @@ public class StompTrackController {
|
||||
queryId,
|
||||
sessionId,
|
||||
chunk -> sendChunkToUser(userId, chunk),
|
||||
status -> {
|
||||
sendStatusToUser(userId, status);
|
||||
// 완료 시 쿼리 등록 제거
|
||||
if ("COMPLETED".equals(status.getStatus()) || "FAILED".equals(status.getStatus())) {
|
||||
activeQueryManager.completeQuery(sessionId);
|
||||
}
|
||||
}
|
||||
// 리소스 정리는 서비스 finally 블록에서 일괄 처리
|
||||
status -> sendStatusToUser(userId, status)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user