mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-15 18:55:56 +08:00
fix(scrapeURL): only retain ArrayTransport in testing
Caused OOM issues in production.
This commit is contained in:
parent
085ac3e71c
commit
628a98d594
@ -97,7 +97,9 @@ function buildMetaObject(id: string, url: string, options: ScrapeOptions, intern
|
||||
|
||||
const _logger = logger.child({ module: "ScrapeURL", scrapeId: id });
|
||||
const logs: any[] = [];
|
||||
_logger.add(new ArrayTransport({ array: logs, scrapeId: id }));
|
||||
if (process.env.ENV !== "test") {
|
||||
_logger.add(new ArrayTransport({ array: logs, scrapeId: id }));
|
||||
}
|
||||
|
||||
return {
|
||||
id, url, options, internalOptions,
|
||||
|
@ -1,5 +1,7 @@
|
||||
import "dotenv/config";
|
||||
|
||||
process.env.ENV = "test";
|
||||
|
||||
import { scrapeURL } from ".";
|
||||
import { scrapeOptions } from "../../controllers/v1/types";
|
||||
import { Engine } from "./engines";
|
||||
|
Loading…
x
Reference in New Issue
Block a user