Skip to content

Commit d160b29

Browse files
committed
fix: cron slug
1 parent 3c96a4c commit d160b29

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/tasks/services/auto-tasks.service.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { Config } from '@app/constants';
1+
import { CronTab } from '@app/decorators';
22
import { Injectable } from '@nestjs/common';
3-
import { Cron } from '@nestjs/schedule';
43
import { LegendTasksService } from '../../legends/services/legend-tasks.service';
54
import { ClanGamesTasksService } from './clan-games-tasks.service';
65

@@ -11,17 +10,15 @@ export class AutoTasksService {
1110
private clanGamesTasksService: ClanGamesTasksService,
1211
) {}
1312

14-
@Cron('59 4 * * *', {
15-
timeZone: 'Etc/UTC',
16-
disabled: !Config.CRON_ENABLED,
13+
@CronTab('59 4 * * *', {
14+
monitor: 'legend-ranking-snapshot',
1715
})
1816
runLegendTasks() {
1917
return this.legendTasksService.takeSnapshot();
2018
}
2119

22-
@Cron('0 5 22 * *', {
23-
timeZone: 'Etc/UTC',
24-
disabled: !Config.CRON_ENABLED,
20+
@CronTab('0 5 22 * *', {
21+
monitor: 'clan-games-log-cleanup',
2522
})
2623
runClanGamesTask() {
2724
return this.clanGamesTasksService.runClanGamesTask();

0 commit comments

Comments
 (0)