fix(scrapeURL): only retain ArrayTransport in testing
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:
Gergő Móricz 2024-11-08 23:12:17 +01:00
parent 085ac3e71c
commit 628a98d594
2 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,9 @@ function buildMetaObject(id: string, url: string, options: ScrapeOptions, intern
const _logger = logger.child({ module: "ScrapeURL", scrapeId: id });
const logs: any[] = [];
if (process.env.ENV !== "test") {
_logger.add(new ArrayTransport({ array: logs, scrapeId: id }));
}
return {
id, url, options, internalOptions,

View File

@ -1,5 +1,7 @@
import "dotenv/config";
process.env.ENV = "test";
import { scrapeURL } from ".";
import { scrapeOptions } from "../../controllers/v1/types";
import { Engine } from "./engines";