feat: move scraper to queue

This commit is contained in:
Gergő Móricz
2024-07-25 00:14:25 +02:00
parent 15890772be
commit 6798695ee4
4 changed files with 60 additions and 27 deletions
+3 -2
View File
@@ -7,11 +7,12 @@ import { WebScraperOptions } from "../types";
export async function addWebScraperJob(
webScraperOptions: WebScraperOptions,
options: any = {}
options: any = {},
jobId: string = uuidv4(),
): Promise<Job> {
return await getWebScraperQueue().add(webScraperOptions, {
...options,
jobId: uuidv4(),
jobId,
});
}