..
This commit is contained in:
@@ -502,10 +502,11 @@ object AutoTradingManager {
|
||||
println("🌙 [System] 업무 종료 및 자원 정리 시작...")
|
||||
SystemSleepPreventer.sleepDisplay() // 모니터 끄기
|
||||
KisWebSocketManager.disconnect()
|
||||
//isSystemReadyToday = false
|
||||
BrowserManager.closeIfIdle(0) // 즉시 닫기
|
||||
if (LlamaServerManager.stopAll()) {
|
||||
isSystemCleanedUpToday = true
|
||||
}
|
||||
|
||||
}
|
||||
println("✅ [System] 오늘의 모든 정리가 완료되었습니다.")
|
||||
} catch (e: Exception) {
|
||||
@@ -637,6 +638,7 @@ object AutoTradingManager {
|
||||
private suspend fun waitForNextCycle(minutes: Double) {
|
||||
println("💤 대기 모드 진입... $minutes")
|
||||
val endWait = System.currentTimeMillis() + (minutes * 60 * 1000L)
|
||||
BrowserManager.closeIfIdle(0) // 즉시 닫기
|
||||
while (System.currentTimeMillis() < endWait && isRunning()) {
|
||||
lastTickTime.set(System.currentTimeMillis()) // 대기 중에도 Watchdog에 생존 신고
|
||||
println("💤 대기 모드 상태 확인...")
|
||||
@@ -645,7 +647,6 @@ object AutoTradingManager {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private suspend fun executeClosingLiquidation(tradeService: KisTradeService) {
|
||||
val activeTrades = DatabaseFactory.findAllMonitoringTrades()
|
||||
val balanceResult = tradeService.fetchIntegratedBalance().getOrNull()
|
||||
|
||||
Reference in New Issue
Block a user