Skip to content

Commit

Permalink
akka-loader: last-match-window change default
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackmorse committed Feb 21, 2024
1 parent 37b705b commit 03a8da6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion akka-loader/src/main/scala/cli/CommandLine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ case class LoadScheduledConfig(entity: String, lastMatchWindow: Int) extends Cli
class CommandLine(arguments: Array[String]) extends ScallopConf(arguments) {
class EntitySubcommand(name: String) extends Subcommand(name) {
val entity = opt[String](required = true, validate = ent => ent == "league" || ent == "cup")
val lastMatchWindow = opt[Int](required = false, default = Some(7))
val lastMatchWindow = opt[Int](required = false, default = Some(4))
}

val schedule = new EntitySubcommand("schedule") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class HattidClickhouseClient @Inject()(val config: Config,

for {
_ <- client.execute(alterDeleteSqlQuery("match_details", cupLevelCondition))
_ <- truncateTable(s"$databaseName.player_info", league, MatchType.LEAGUE_MATCH)
_ <- truncateTable(s"$databaseName.player_events", league, MatchType.LEAGUE_MATCH)
_ <- truncateTable("player_info", league, MatchType.CUP_MATCH)
_ <- truncateTable("player_events", league, MatchType.CUP_MATCH)
r <- client.execute(alterDeleteSqlQuery("player_stats", cupLevelCondition))
} yield r
}
Expand Down

0 comments on commit 03a8da6

Please sign in to comment.