mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-19 22:09:07 +08:00
async saving to index
This commit is contained in:
parent
d1b5e2ef47
commit
60525220a2
@ -20,6 +20,8 @@ export async function sendDocumentToIndex(meta: Meta, document: Document) {
|
|||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
try {
|
||||||
const normalizedURL = normalizeURLForIndex(meta.url);
|
const normalizedURL = normalizeURLForIndex(meta.url);
|
||||||
const urlHash = await hashURL(normalizedURL);
|
const urlHash = await hashURL(normalizedURL);
|
||||||
|
|
||||||
@ -70,6 +72,12 @@ export async function sendDocumentToIndex(meta: Meta, document: Document) {
|
|||||||
error,
|
error,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
meta.logger.error("Failed to save document to index (outer)", {
|
||||||
|
error,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user