refactor: update timer record calls to use Runnable type
Build & Test (NowChessSystems) TeamCity build failed
Build & Test (NowChessSystems) TeamCity build failed
This commit is contained in:
+2
-2
@@ -88,8 +88,8 @@ class OfficialBotService:
|
||||
botController.getBot(botName).orElse(botController.getBot(level.toString.toLowerCase)).foreach { bot =>
|
||||
FenParser.parseFen(fen).toOption.foreach { context =>
|
||||
val timer = meterRegistry.timer("nowchess.bot.move.duration", "bot", botName)
|
||||
val moveOpt = timer.recordCallable(() => bot(context))
|
||||
moveOpt.flatten.foreach { move =>
|
||||
val moveOpt = timer.recordCallable[Option[Move]](() => bot(context))
|
||||
moveOpt.foreach { move =>
|
||||
meterRegistry.counter("nowchess.bot.moves.computed", "bot", botName).increment()
|
||||
val uci = toUci(move)
|
||||
val c2sTopic = s"${redisConfig.prefix}:game:$gameId:c2s"
|
||||
|
||||
Reference in New Issue
Block a user