rename lobbyActor

pull/9985/head
Thibault Duplessis 2021-10-18 09:10:40 +02:00
parent ae01daf9ba
commit 4614a3421f
4 changed files with 7 additions and 7 deletions

View File

@ -5,13 +5,13 @@ import lila.game.{ Pov, Source }
final private class AbortListener(
userRepo: lila.user.UserRepo,
seekApi: SeekApi,
lobbyTrouper: LobbySyncActor
lobbyActor: LobbySyncActor
)(implicit ec: scala.concurrent.ExecutionContext) {
def apply(pov: Pov): Funit =
(pov.game.isCorrespondence ?? recreateSeek(pov)) >>-
cancelColorIncrement(pov) >>-
lobbyTrouper.registerAbortedGame(pov.game)
lobbyActor.registerAbortedGame(pov.game)
private def cancelColorIncrement(pov: Pov): Unit =
if (pov.game.source.exists(s => s == Source.Lobby || s == Source.Pool)) pov.game.userIds match {

View File

@ -209,7 +209,7 @@ private object LobbySyncActor {
makeTrouper: () => LobbySyncActor
)(implicit ec: scala.concurrent.ExecutionContext, system: akka.actor.ActorSystem) = {
val trouper = makeTrouper()
Bus.subscribe(trouper, "lobbyTrouper")
Bus.subscribe(trouper, "lobbyActor")
system.scheduler.scheduleWithFixedDelay(15 seconds, resyncIdsPeriod)(() => trouper ! actorApi.Resync)
lila.common.ResilientScheduler(
every = Every(broomPeriod),

View File

@ -13,13 +13,13 @@ final private class HookThieve()(implicit
def candidates(clock: chess.Clock.Config): Fu[PoolHooks] =
Bus
.ask[PoolHooks]("lobbyTrouper")(GetCandidates(clock, _))
.ask[PoolHooks]("lobbyActor")(GetCandidates(clock, _))
.logFailure(logger)
.recoverDefault(PoolHooks(Vector.empty))
def stolen(poolHooks: Vector[PoolHook], monId: String) = {
lila.mon.lobby.pool.thieve.stolen(monId).record(poolHooks.size)
if (poolHooks.nonEmpty) Bus.publish(StolenHookIds(poolHooks.map(_.hookId)), "lobbyTrouper")
if (poolHooks.nonEmpty) Bus.publish(StolenHookIds(poolHooks.map(_.hookId)), "lobbyActor")
}
}

View File

@ -40,7 +40,7 @@ final private[setup] class Processor(
config.hook(sri, ctx.me, sid, blocking) match {
case Left(hook) =>
fuccess {
Bus.publish(AddHook(hook), "lobbyTrouper")
Bus.publish(AddHook(hook), "lobbyActor")
Created(hook.id)
}
case Right(Some(seek)) =>
@ -57,7 +57,7 @@ final private[setup] class Processor(
import Processor.HookResult._
if (maxPlaying <= nbPlaying) Refused
else {
Bus.publish(AddSeek(seek), "lobbyTrouper")
Bus.publish(AddSeek(seek), "lobbyActor")
Created(seek.id)
}
}