diff --git a/packages/server/src/automations/logging/index.ts b/packages/server/src/automations/logging/index.ts index 2b312521c1..dfb3ef81ed 100644 --- a/packages/server/src/automations/logging/index.ts +++ b/packages/server/src/automations/logging/index.ts @@ -13,6 +13,7 @@ import { } from "../../db/utils" import { createLogByAutomationView } from "../../db/views/staticViews" import { Automation } from "../../definitions/common" +import * as env from "../../environment" const PAGE_SIZE = 9 const EARLIEST_DATE = new Date(0).toISOString() @@ -134,6 +135,10 @@ export async function storeLog( automation: Automation, results: AutomationResults ) { + // can disable this if un-needed in self host + if (env.DISABLE_AUTOMATION_LOGS) { + return + } const db = getAppDB() const automationId = automation._id const name = automation.name diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 56d05684b0..a78d9f67f4 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -76,6 +76,7 @@ module.exports = { ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING, DISABLE_DEVELOPER_LICENSE: process.env.DISABLE_DEVELOPER_LICENSE, + DISABLE_AUTOMATION_LOGS: process.env.DISABLE_AUTOMATION_LOGS, MULTI_TENANCY: process.env.MULTI_TENANCY, ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS, SELF_HOSTED: process.env.SELF_HOSTED,