mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-20 02:29:04 +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;
|
||||
}
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const normalizedURL = normalizeURLForIndex(meta.url);
|
||||
const urlHash = await hashURL(normalizedURL);
|
||||
|
||||
@ -70,6 +72,12 @@ export async function sendDocumentToIndex(meta: Meta, document: Document) {
|
||||
error,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
meta.logger.error("Failed to save document to index (outer)", {
|
||||
error,
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
||||
return document;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user