remove superfluous config

pull/9131/head
Thibault Duplessis 2021-06-07 10:18:12 +02:00
parent 6b9a3673c8
commit 60eaf50068
2 changed files with 5 additions and 27 deletions

View File

@ -275,15 +275,6 @@ push {
json = ""
}
}
mod {
collection {
modlog = modlog
player_assessment = player_assessment
gaming_history = mod_gaming_history
}
boosting.nb_games_to_mark = 5
boosting.ratio_games_to_mark = 0.01
}
report {
collection.report = report2
actor.name = report

View File

@ -8,15 +8,6 @@ import play.api.Configuration
import lila.common.config._
import lila.user.User
@Module
private class ModConfig(
@ConfigName("collection.player_assessment") val assessmentColl: CollName,
@ConfigName("collection.modlog") val modlogColl: CollName,
@ConfigName("collection.gaming_history") val gamingHistoryColl: CollName,
@ConfigName("boosting.nb_games_to_mark") val boostingNbGamesToMark: Int,
@ConfigName("boosting.ratio_games_to_mark") val boostingRatioToMark: Int
)
@Module
final class Env(
appConfig: Configuration,
@ -43,16 +34,12 @@ final class Env(
msgApi: lila.msg.MsgApi
)(implicit
ec: scala.concurrent.ExecutionContext,
system: ActorSystem
system: ActorSystem,
scheduler: Scheduler
) {
private val config = appConfig.get[ModConfig]("mod")(AutoConfig.loader)
private def scheduler = system.scheduler
private lazy val logRepo = new ModlogRepo(db(config.modlogColl))
private lazy val assessmentRepo = new AssessmentRepo(db(config.assessmentColl))
private lazy val historyRepo = new HistoryRepo(db(config.gamingHistoryColl))
private lazy val logRepo = new ModlogRepo(db(CollName("modlog")))
private lazy val assessmentRepo = new AssessmentRepo(db(CollName("player_assessment")))
private lazy val historyRepo = new HistoryRepo(db(CollName("mod_gaming_history")))
lazy val logApi = wire[ModlogApi]