This commit is contained in:
lunaticbum 2026-03-30 17:00:39 +09:00
parent cab381645c
commit 3bbdf47011
2 changed files with 17 additions and 7 deletions

View File

@ -99,13 +99,23 @@ private var isAppStarted = false
fun main() = application { fun main() = application {
if (!isAppStarted) { if (!isAppStarted) {
initLogger(DETAILLOG) initLogger(DETAILLOG)
val (port1, port2) = PortFinder.findAvailablePortPair(18080) try {
val (port1, port2) = PortFinder.findAvailablePortPair(18080, false)
if (port1 > 18000 && port2 > port1) {
println("🚀 AI 서버용 포트 할당 완료: 메인($port1), 서브($port2)")
LLM_PORT = port1
EMBEDDING_PORT = port2
println("🚀 AI 서버용 포트 할당 완료: 메인($port1), 서브($port2)") isAppStarted = true
LLM_PORT = port1 } else {
EMBEDDING_PORT = port2 println("🚀 AI 서버용 포트 할당 실패")
exitApplication()
isAppStarted = true }
} catch (e: Exception) {
println("🚀 AI 서버용 포트 할당 에러 : ${e.message}")
e.printStackTrace()
exitApplication()
}
} }
val trayState = rememberTrayState() val trayState = rememberTrayState()

View File

@ -249,7 +249,7 @@ object RagService {
println("✅ [$stockName] 전체 분석 완료 총 소요: ${totalDuration}ms") println("✅ [$stockName] 전체 분석 완료 총 소요: ${totalDuration}ms")
// 상세 로그 남기기 // 상세 로그 남기기
TradingLogStore.addAnalyzer(stockName, stockCode, "분석시간 상세: 재무(${financialDuration}ms), 뉴스(${newsIngestDuration}ms), RAG(${ragDuration}ms), AI(${aiDecisionDuration}ms)", true) TradingLogStore.addAnalyzer(stockName, stockCode, "분석시간 상세: 재무(${financialDuration}ms), 뉴스(${newsIngestDuration}ms), RAG(${ragDuration}ms), AI(${aiDecisionDuration}ms), 전체 분석 완료(${totalDuration}ms)", true)
result(finalDecision, true) result(finalDecision, true)
} else { } else {