mirror of
https://github.com/mendableai/firecrawl.git
synced 2025-11-23 13:41:07 +00:00
Revert "feat(queue-worker): always crawl links from content even if sitemapped"
This reverts commit 3c045c43a446bb7895892338c881cd7bc4f77cbf.
This commit is contained in:
parent
445fc432e9
commit
258c67ce67
@ -300,6 +300,7 @@ async function processJob(job: Job, token: string) {
|
|||||||
|
|
||||||
const sc = (await getCrawl(job.data.crawl_id)) as StoredCrawl;
|
const sc = (await getCrawl(job.data.crawl_id)) as StoredCrawl;
|
||||||
|
|
||||||
|
if (!job.data.sitemapped) {
|
||||||
if (!sc.cancelled) {
|
if (!sc.cancelled) {
|
||||||
const crawler = crawlToCrawler(job.data.crawl_id, sc);
|
const crawler = crawlToCrawler(job.data.crawl_id, sc);
|
||||||
|
|
||||||
@ -311,6 +312,7 @@ async function processJob(job: Job, token: string) {
|
|||||||
|
|
||||||
for (const link of links) {
|
for (const link of links) {
|
||||||
if (await lockURL(job.data.crawl_id, sc, link)) {
|
if (await lockURL(job.data.crawl_id, sc, link)) {
|
||||||
|
// This seems to work really welel
|
||||||
const jobPriority = await getJobPriority({
|
const jobPriority = await getJobPriority({
|
||||||
plan: sc.plan as PlanType,
|
plan: sc.plan as PlanType,
|
||||||
team_id: sc.team_id,
|
team_id: sc.team_id,
|
||||||
@ -318,6 +320,11 @@ async function processJob(job: Job, token: string) {
|
|||||||
});
|
});
|
||||||
const jobId = uuidv4();
|
const jobId = uuidv4();
|
||||||
|
|
||||||
|
// console.log("plan: ", sc.plan);
|
||||||
|
// console.log("team_id: ", sc.team_id)
|
||||||
|
// console.log("base priority: ", job.data.crawl_id ? 20 : 10)
|
||||||
|
// console.log("job priority: " , jobPriority, "\n\n\n")
|
||||||
|
|
||||||
const newJob = await addScrapeJob(
|
const newJob = await addScrapeJob(
|
||||||
{
|
{
|
||||||
url: link,
|
url: link,
|
||||||
@ -338,6 +345,7 @@ async function processJob(job: Job, token: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (await finishCrawl(job.data.crawl_id)) {
|
if (await finishCrawl(job.data.crawl_id)) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user