From 239b6ee33f3f781cac8b81fc7dbcc20ec535a4b2 Mon Sep 17 00:00:00 2001 From: Swan Date: Sun, 24 Nov 2024 11:32:32 -0500 Subject: [PATCH] Add cron job for clan recalc --- cmd/cron/main.go | 1 + config.example.json | 5 +++++ config/config.go | 1 + 3 files changed, 7 insertions(+) diff --git a/cmd/cron/main.go b/cmd/cron/main.go index cb941c2..4a25dc8 100644 --- a/cmd/cron/main.go +++ b/cmd/cron/main.go @@ -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() diff --git a/config.example.json b/config.example.json index bdb4043..22bf802 100644 --- a/config.example.json +++ b/config.example.json @@ -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 * * * *" } } } \ No newline at end of file diff --git a/config/config.go b/config/config.go index ad66038..3c500aa 100644 --- a/config/config.go +++ b/config/config.go @@ -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"` }