Add archive downvote segment cron

This commit is contained in:
Haidang666
2021-07-09 11:46:04 +07:00
parent ef86fceedd
commit 6b5156468c
8 changed files with 149 additions and 2 deletions

13
src/cronjob/index.ts Normal file
View File

@@ -0,0 +1,13 @@
import { Logger } from "../utils/logger";
import { config } from "../config";
import DownvoteSegmentArchiveJob from "./downvoteSegmentArchiveJob";
export function startAllCrons (): void {
if (config?.crons?.enabled) {
Logger.info("Crons started");
DownvoteSegmentArchiveJob.start();
} else {
Logger.info("Crons dissabled");
}
}