mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 20:40:01 +08:00
fix(crawl-redis): oops
This commit is contained in:
parent
845c2744a9
commit
f82b9c205c
@ -139,7 +139,7 @@ export function generateURLPermutations(url: string | URL): URL[] {
|
||||
}
|
||||
|
||||
export async function lockURL(id: string, sc: StoredCrawl, url: string): Promise<boolean> {
|
||||
const logger = _logger.child({ crawlId: id, module: "crawl-redis", method: "lockURL", preNormalizedURL: url, teamId: sc.team_id, plan: sc.plan });
|
||||
let logger = _logger.child({ crawlId: id, module: "crawl-redis", method: "lockURL", preNormalizedURL: url, teamId: sc.team_id, plan: sc.plan });
|
||||
|
||||
if (typeof sc.crawlerOptions?.limit === "number") {
|
||||
if (await redisConnection.scard("crawl:" + id + ":visited_unique") >= sc.crawlerOptions.limit) {
|
||||
@ -149,7 +149,7 @@ export async function lockURL(id: string, sc: StoredCrawl, url: string): Promise
|
||||
}
|
||||
|
||||
url = normalizeURL(url, sc);
|
||||
logger.defaultMeta.url = url;
|
||||
logger = logger.child({ url });
|
||||
|
||||
logger.debug("Locking URL " + JSON.stringify(url) + "...");
|
||||
await redisConnection.sadd("crawl:" + id + ":visited_unique", url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user