mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
fix(crawl-redis): batch scrape lockURL
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
This commit is contained in:
parent
d8bb1f68c6
commit
f6db9f1428
|
@ -144,7 +144,7 @@ export async function lockURL(id: string, sc: StoredCrawl, url: string): Promise
|
|||
await redisConnection.expire("crawl:" + id + ":visited_unique", 24 * 60 * 60, "NX");
|
||||
|
||||
let res: boolean;
|
||||
if (!sc.crawlerOptions.deduplicateSimilarURLs) {
|
||||
if (!sc.crawlerOptions?.deduplicateSimilarURLs) {
|
||||
res = (await redisConnection.sadd("crawl:" + id + ":visited", url)) !== 0
|
||||
} else {
|
||||
const permutations = generateURLPermutations(url);
|
||||
|
|
Loading…
Reference in New Issue
Block a user