Skip to content

Commit 239b6ee

Browse files
committed
Add cron job for clan recalc
1 parent 97c7989 commit 239b6ee

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

cmd/cron/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func main() {
4545
registerCronJob(c, jobs.SupervisorActivity.Job, func() { commands.SupervisorActivityCmd.Run(nil, nil) })
4646
registerCronJob(c, jobs.RankClanMap.Job, func() { commands.ClanRankMapCmd.Run(nil, nil) })
4747
registerCronJob(c, jobs.DenyOnHoldOneMonth.Job, func() { commands.DenyOnHoldCmd.Run(nil, nil) })
48+
registerCronJob(c, jobs.ClanRecalculate.Job, func() { commands.ClanRecalculateCommand.Run(nil, nil) })
4849

4950
c.Start()
5051

config.example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
"enabled": true,
133133
"name": "Denies mapsets that are on-hold for month+",
134134
"schedule": "0 * * * *"
135+
},
136+
"clan_recalculate": {
137+
"enabled": true,
138+
"name": "Performs a full recalculation on clans",
139+
"schedule": "0 * * * *"
135140
}
136141
}
137142
}

config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ type Config struct {
116116
SupervisorActivity CronJob `json:"supervisor_activity"`
117117
RankClanMap CronJob `json:"rank_clan_map"`
118118
DenyOnHoldOneMonth CronJob `json:"deny_on_hold_one_month"`
119+
ClanRecalculate CronJob `json:"clan_recalculate"`
119120
} `json:"cron"`
120121
}
121122

0 commit comments

Comments
 (0)