run coach on another mongodb instance - lol that was easy

coach2
Thibault Duplessis 2015-11-25 12:13:30 +07:00
parent 3a8c8bd951
commit fa3f0a3345
2 changed files with 8 additions and 2 deletions

View File

@ -548,6 +548,10 @@ importer {
}
mobile.app.version = "1.3.0"
coach {
mongodb {
uri = "mongodb://127.0.0.1:27037/lichess"
mongo-async-driver = {}
}
collection {
entry = coach_entry
}

View File

@ -13,13 +13,15 @@ final class Env(
areFriends: (String, String) => Fu[Boolean],
lightUser: String => Option[lila.common.LightUser],
system: ActorSystem,
db: lila.db.Env) {
lifecycle: play.api.inject.ApplicationLifecycle) {
private val settings = new {
val CollectionEntry = config getString "collection.entry"
}
import settings._
private val db = new lila.db.Env(config getConfig "mongodb", lifecycle)
// private lazy val jsonWriters = new JSONWriters(lightUser = lightUser)
lazy val share = new Share(getPref, areFriends)
@ -41,5 +43,5 @@ object Env {
areFriends = lila.relation.Env.current.api.areFriends,
lightUser = lila.user.Env.current.lightUser,
system = lila.common.PlayApp.system,
db = lila.db.Env.current)
lifecycle = lila.common.PlayApp.lifecycle)
}