fix(runWebScraper): don't filter empty docs

This commit is contained in:
Gergo Moricz 2024-08-07 21:00:22 +02:00
parent 55ec96c23f
commit 920b7f2f44
2 changed files with 1 additions and 2 deletions

View File

@ -104,7 +104,7 @@ export async function runWebScraper({
return { url: doc.metadata.sourceURL }; return { url: doc.metadata.sourceURL };
} }
}) })
: docs.filter((doc) => doc.content.trim().length > 0); : docs;
const isCancelled = await (await getWebScraperQueue().client).exists("cancelled:" + bull_job_id); const isCancelled = await (await getWebScraperQueue().client).exists("cancelled:" + bull_job_id);

View File

@ -52,7 +52,6 @@ const processJobInternal = async (token: string, job: Job) => {
try { try {
const result = await processJob(job, token); const result = await processJob(job, token);
const jobState = await job.getState(); const jobState = await job.getState();
console.log("done", job, jobState, result);
if (jobState !== "completed" && jobState !== "failed") { if (jobState !== "completed" && jobState !== "failed") {
await job.moveToCompleted(result.docs, token, false); await job.moveToCompleted(result.docs, token, false);
} }