From 1f7e087c95908aae55971911896e735b8702e6e8 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Fri, 10 May 2013 10:41:22 -0300 Subject: [PATCH] temporary disable scheduler --- app/controllers/Round.scala | 11 ++++------- modules/common/src/main/PlayApp.scala | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/controllers/Round.scala b/app/controllers/Round.scala index 8ae06bb56c..1f9582b139 100644 --- a/app/controllers/Round.scala +++ b/app/controllers/Round.scala @@ -20,7 +20,6 @@ object Round extends LilaController with TheftPrevention with RoundEventPerforme private def bookmarkApi = Env.bookmark.api private def analyser = Env.analyse.analyser // private def tournamentRepo = Env.tournament.repo - private def gameJs = Env.game.gameJs def websocketWatcher(gameId: String, color: String) = Socket[JsValue] { implicit ctx ⇒ (get("sri") |@| getInt("version")).tupled zmap { @@ -28,16 +27,14 @@ object Round extends LilaController with TheftPrevention with RoundEventPerforme } } - def websocketPlayer(fullId: String) = WebSocket.async[JsValue] { implicit req ⇒ - reqToCtx(req) flatMap { implicit ctx ⇒ - (get("sri") |@| getInt("version") |@| get("tk2")).tupled zmap { - case (uid, version, token) ⇒ env.socketHandler.player(fullId, version, uid, token, ctx) - } + def websocketPlayer(fullId: String) = Socket[JsValue] { implicit ctx ⇒ + (get("sri") |@| getInt("version") |@| get("tk2")).tupled zmap { + case (uid, version, token) ⇒ env.socketHandler.player(fullId, version, uid, token, ctx) } } def signedJs(gameId: String) = OpenNoCtx { req ⇒ - JsOk(GameRepo token gameId map gameJs.sign, CACHE_CONTROL -> "max-age=3600") + JsOk(GameRepo token gameId map Env.game.gameJs.sign, CACHE_CONTROL -> "max-age=3600") } def player(fullId: String) = Open { implicit ctx ⇒ diff --git a/modules/common/src/main/PlayApp.scala b/modules/common/src/main/PlayApp.scala index 81ef6c7a6b..a6c76887a8 100644 --- a/modules/common/src/main/PlayApp.scala +++ b/modules/common/src/main/PlayApp.scala @@ -16,7 +16,8 @@ object PlayApp { play.api.libs.concurrent.Akka.system } - def scheduler = new Scheduler(system, enabled = isServer) + private def enableScheduler = false // isServer + def scheduler = new Scheduler(system, enabled = enableScheduler) def isDev = isMode(_.Dev) def isTest = isMode(_.Test)