server/classes/queues/fetch.ts

18 lines
350 B
TypeScript
Raw Normal View History

import { Queue } from "bullmq";
import { connection } from "~/utils/redis.ts";
export enum FetchJobType {
Instance = "instance",
User = "user",
Note = "user",
}
export type FetchJobData = {
uri: string;
refetcher?: string;
};
export const fetchQueue = new Queue<FetchJobData, void, FetchJobType>("fetch", {
connection,
});