Skip to content

Commit

Permalink
Add cron job for clan recalc
Browse files Browse the repository at this point in the history
  • Loading branch information
Swan committed Nov 24, 2024
1 parent 97c7989 commit 239b6ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/cron/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func main() {
registerCronJob(c, jobs.SupervisorActivity.Job, func() { commands.SupervisorActivityCmd.Run(nil, nil) })
registerCronJob(c, jobs.RankClanMap.Job, func() { commands.ClanRankMapCmd.Run(nil, nil) })
registerCronJob(c, jobs.DenyOnHoldOneMonth.Job, func() { commands.DenyOnHoldCmd.Run(nil, nil) })
registerCronJob(c, jobs.ClanRecalculate.Job, func() { commands.ClanRecalculateCommand.Run(nil, nil) })

c.Start()

Expand Down
5 changes: 5 additions & 0 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
"enabled": true,
"name": "Denies mapsets that are on-hold for month+",
"schedule": "0 * * * *"
},
"clan_recalculate": {
"enabled": true,
"name": "Performs a full recalculation on clans",
"schedule": "0 * * * *"
}
}
}
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ type Config struct {
SupervisorActivity CronJob `json:"supervisor_activity"`
RankClanMap CronJob `json:"rank_clan_map"`
DenyOnHoldOneMonth CronJob `json:"deny_on_hold_one_month"`
ClanRecalculate CronJob `json:"clan_recalculate"`
} `json:"cron"`
}

Expand Down

0 comments on commit 239b6ee

Please sign in to comment.