Ensure static environment
parent
076211e0b4
commit
408cf76679
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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^"
|
||||
|
|
Loading…
Reference in New Issue