fix(queue-worker): finish crawl if all addable URLs were already locked (#1582)

This commit is contained in:
Gergő Móricz 2025-05-21 22:40:31 +02:00 committed by GitHub
parent 9bb97388e2
commit a3aee9be13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,11 +239,15 @@ async function finishCrawlIfNeeded(job: Job & { id: string }, sc: StoredCrawl) {
);
await addScrapeJobs(lockedJobs);
logger.info("Added jobs, not going for the full finish", {
lockedJobs: lockedJobs.length,
});
if (lockedJobs.length > 0) {
logger.info("Added jobs, not going for the full finish", {
lockedJobs: lockedJobs.length,
});
return;
return;
} else {
logger.info("No jobs added (all discovered URLs were locked), finishing crawl");
}
}
}