...
This commit is contained in:
+16
-6
@@ -99,13 +99,23 @@ private var isAppStarted = false
|
||||
fun main() = application {
|
||||
if (!isAppStarted) {
|
||||
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)")
|
||||
LLM_PORT = port1
|
||||
EMBEDDING_PORT = port2
|
||||
|
||||
isAppStarted = true
|
||||
isAppStarted = true
|
||||
} else {
|
||||
println("🚀 AI 서버용 포트 할당 실패")
|
||||
exitApplication()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
println("🚀 AI 서버용 포트 할당 에러 : ${e.message}")
|
||||
e.printStackTrace()
|
||||
exitApplication()
|
||||
}
|
||||
}
|
||||
|
||||
val trayState = rememberTrayState()
|
||||
|
||||
Reference in New Issue
Block a user