mirror of
https://github.com/mendableai/firecrawl.git
synced 2025-12-30 00:37:31 +00:00
feat(scrapeURL): reintroduce default timeout for simple queries (#1440)
* feat(scrapeURL): reintroduce default timeout * fix * adjust timeouts
This commit is contained in:
parent
7bb5643028
commit
4294face78
@ -8,7 +8,7 @@ describe("Batch scrape tests", () => {
|
||||
|
||||
expect(response.body.data[0]).toHaveProperty("markdown");
|
||||
expect(response.body.data[0].markdown).toContain("Firecrawl");
|
||||
}, 30000);
|
||||
}, 180000);
|
||||
|
||||
if (!process.env.TEST_SUITE_SELF_HOSTED) {
|
||||
describe("JSON format", () => {
|
||||
@ -45,7 +45,7 @@ describe("Batch scrape tests", () => {
|
||||
expect(response.body.data[0].json).toHaveProperty("is_open_source");
|
||||
expect(response.body.data[0].json.is_open_source).toBe(true);
|
||||
expect(typeof response.body.data[0].json.is_open_source).toBe("boolean");
|
||||
}, 30000);
|
||||
}, 180000);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -230,7 +230,9 @@ async function scrapeURLLoop(meta: Meta): Promise<ScrapeUrlResponse> {
|
||||
const timeToRun =
|
||||
meta.options.timeout !== undefined
|
||||
? Math.round(meta.options.timeout / Math.min(fallbackList.length, 2))
|
||||
: undefined;
|
||||
: (!meta.options.actions && !meta.options.jsonOptions && !meta.options.extract)
|
||||
? Math.round(120000 / Math.min(fallbackList.length, 2))
|
||||
: undefined;
|
||||
|
||||
for (const { engine, unsupportedFeatures } of fallbackList) {
|
||||
meta.internalOptions.abort?.throwIfAborted();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user