Skip to content

Commit

Permalink
tweak boot
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 17, 2018
1 parent e9d4f3e commit 005d848
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 6 additions & 10 deletions app/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,15 @@ final class Env(
system.lilaBus.publish(lila.hub.actorApi.security.CloseAccount(user.id), 'accountClose)
}

system.lilaBus.subscribe(system.actorOf(Props(new Actor {
def receive = {
case lila.hub.actorApi.security.GarbageCollect(userId, _) =>
system.scheduler.scheduleOnce(1 second) {
closeAccount(userId, self = false)
}
}
})), 'garbageCollect)
system.lilaBus.subscribeFun('garbageCollect) {
case lila.hub.actorApi.security.GarbageCollect(userId, _) =>
system.scheduler.scheduleOnce(1 second) {
closeAccount(userId, self = false)
}
}

system.actorOf(Props(new actor.Renderer), name = RendererName)

lila.log.boot.info(s"Java version ${System.getProperty("java.version")}")
lila.log.boot.info("Preloading modules")
lila.common.Chronometer.syncEffect(List(
Env.socket,
Env.site,
Expand Down
4 changes: 4 additions & 0 deletions app/Global.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import play.api.{ Application, GlobalSettings }

object Global extends GlobalSettings {

val version = System.getProperty("java.version")
val memory = Runtime.getRuntime().maxMemory() / 1024 / 1024
lila.log.boot.info(s"Java version: $version, memory: ${memory}MB")

private val httpLogger = lila.log("http")

private def logHttp(code: Int, req: RequestHeader, exception: Option[Throwable] = None) = {
Expand Down

0 comments on commit 005d848

Please sign in to comment.