Ensure static environment

pull/1/merge
Thibault Duplessis 2012-03-17 23:04:02 +01:00
parent 076211e0b4
commit 408cf76679
3 changed files with 9 additions and 6 deletions

View File

@ -1,9 +1,12 @@
package lila.http
import lila.system.SystemEnv
import com.typesafe.config.Config
final class HttpEnv(c: Config) extends SystemEnv {
import play.api.Play
protected val config = c
object HttpEnv {
lazy val static = new SystemEnv {
protected val config = Play.unsafeApplication.configuration.underlying
}
}

View File

@ -12,7 +12,7 @@ import scalaz.effects.IO
trait LilaController extends Controller {
val env = new HttpEnv(Play.unsafeApplication.configuration.underlying)
lazy val env = HttpEnv.static
val json = "application/json"

View File

@ -11,8 +11,8 @@ redis {
port = 6379
}
sync {
duration = 5000
sleep = 1000
duration = 10000
sleep = 200
}
application.secret="CiebwjgIM9cHQ;I?Xk:sfqDJ;BhIe:jsL?r=?IPF[saf>s^r0]?0grUq4>q?5mP^"