cvsa/lib/mq/init.ts
2025-02-09 22:38:45 +08:00

15 lines
368 B
TypeScript

import { MINUTE } from "$std/datetime/constants.ts";
import MainQueue from "lib/mq/index.ts";
import logger from "lib/log/logger.ts";
async function configGetLatestVideos() {
await MainQueue.upsertJobScheduler("getLatestVideos", {
every: 1 * MINUTE
})
}
export async function initMQ() {
await configGetLatestVideos()
logger.log("Message queue initialized.")
}