feat: implement periodic scaling checks and enhance instance management in AutoScaler
Build & Test (NowChessSystems) TeamCity build failed

This commit is contained in:
2026-05-13 22:08:22 +02:00
parent 0a3c494fa8
commit 3f12f695f1
4 changed files with 85 additions and 50 deletions
@@ -60,8 +60,8 @@ class GameEngine(
@SuppressWarnings(Array("DisableSyntax.var"))
private var pendingTakebackRequest: Option[Color] = initialTakebackRequest
GameEngine.activeGamesCount.incrementAndGet()
meterRegistry.foreach { reg =>
GameEngine.activeGamesCount.incrementAndGet()
reg.counter("nowchess.games.started").increment()
}
private def gamesCompletedCounter(result: String): Counter =
@@ -199,7 +199,7 @@ class InstanceHeartbeatService:
val json = mapper.writeValueAsString(metadata)
reactiveRedis
.value(classOf[String])
.setex(key, 5L, json)
.setex(key, 15L, json)
.subscribe()
.`with`(
_ => redisHeartbeatPending.set(false),