mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 20:26:03 +08:00
Update index.ts
This commit is contained in:
parent
98f27b0acc
commit
a5256827c0
@ -51,7 +51,11 @@ async function performFireEngineScrape<
|
||||
});
|
||||
}
|
||||
|
||||
if (Date.now() - startTime > timeout) {
|
||||
const userParam = request.timeout ?? 0;
|
||||
// Use 70% of the user-provided timeout as the timeout for fire-engine check status
|
||||
const fireEngineTimeout = timeout + Math.round(userParam * 0.7);
|
||||
const fullTimeout = Math.max(fireEngineTimeout, timeout);
|
||||
if (Date.now() - startTime > fullTimeout) {
|
||||
logger.info(
|
||||
"Fire-engine was unable to scrape the page before timing out.",
|
||||
{ errors, timeout },
|
||||
|
Loading…
x
Reference in New Issue
Block a user