make reporting requests parallel
This commit is contained in:
parent
85d3cd89c2
commit
1744bef350
|
@ -67,14 +67,13 @@ private[monitor] final class Reporting(
|
||||||
val before = nowMillis
|
val before = nowMillis
|
||||||
MongoStatus(db.db)(mongoStatus) zip
|
MongoStatus(db.db)(mongoStatus) zip
|
||||||
(hub.actor.ai ? lila.hub.actorApi.ai.GetLoad).mapTo[Option[Int]] zip
|
(hub.actor.ai ? lila.hub.actorApi.ai.GetLoad).mapTo[Option[Int]] zip
|
||||||
List((hub.socket.site ? GetNbMembers),
|
(hub.socket.site ? GetNbMembers).mapTo[Int] zip
|
||||||
(hub.socket.lobby ? GetNbMembers),
|
(hub.socket.lobby ? GetNbMembers).mapTo[Int] zip
|
||||||
(hub.socket.round ? Size),
|
(hub.socket.round ? Size).mapTo[Int] zip
|
||||||
(hub.socket.round ? GetNbMembers),
|
(hub.socket.round ? GetNbMembers).mapTo[Int] zip
|
||||||
(hub.actor.game ? lila.hub.actorApi.game.Count)
|
(hub.actor.game ? lila.hub.actorApi.game.Count).mapTo[Int] onComplete {
|
||||||
).map(_.mapTo[Int]).sequenceFu onComplete {
|
|
||||||
case Failure(e) ⇒ logwarn("[reporting] " + e.getMessage)
|
case Failure(e) ⇒ logwarn("[reporting] " + e.getMessage)
|
||||||
case Success(((mongoS, aiL), List(siteMembers, lobbyMembers, gameHubs, gameMembers, games))) ⇒ {
|
case Success(((((((mongoS, aiL), siteMembers), lobbyMembers), gameHubs), gameMembers), games)) ⇒ {
|
||||||
latency = (nowMillis - before).toInt
|
latency = (nowMillis - before).toInt
|
||||||
site = SiteSocket(siteMembers)
|
site = SiteSocket(siteMembers)
|
||||||
lobby = LobbySocket(lobbyMembers)
|
lobby = LobbySocket(lobbyMembers)
|
||||||
|
|
Loading…
Reference in a new issue