Skip to content

Commit a585340

Browse files
committed
2 parents ec2c0f6 + 71878cf commit a585340

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/api/src/lib/concurrency-limit.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const constructQueueKey = (team_id: string) =>
99
const stalledJobTimeoutMs = 2 * 60 * 1000;
1010

1111
export function getConcurrencyLimitMax(plan: string): number {
12+
if (plan === "growth") return 100;
1213
return getRateLimiterPoints(RateLimiterMode.Scrape, undefined, plan);
1314
}
1415

apps/api/src/scraper/WebScraper/crawler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,13 @@ export class WebCrawler {
401401

402402
public async extractLinksFromHTML(html: string, url: string) {
403403
try {
404-
return (await this.extractLinksFromHTMLRust(html, url)).map(x => {
404+
return [...new Set((await this.extractLinksFromHTMLRust(html, url)).map(x => {
405405
try {
406406
return new URL(x, url).href
407407
} catch (e) {
408408
return null;
409409
}
410-
}).filter(x => x !== null) as string[];
410+
}).filter(x => x !== null) as string[])];
411411
} catch (error) {
412412
this.logger.error("Failed to call html-transformer! Falling back to cheerio...", {
413413
error,

0 commit comments

Comments
 (0)