mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
fix(scrapeURL): only retain ArrayTransport in testing
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
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…
Reference in New Issue
Block a user