From cd8ca8412d02090af07d8657283b7637178c975c Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Tue, 13 Feb 2024 13:40:50 +0100 Subject: [PATCH] fix(core): Give better error message if `executions.process` is still used in the configs (#8618) --- packages/cli/src/config/index.ts | 5 +++++ packages/cli/src/config/schema.ts | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts index 5cc2d2a0c1..6a83f7e6d5 100644 --- a/packages/cli/src/config/index.ts +++ b/packages/cli/src/config/index.ts @@ -73,6 +73,11 @@ if (userManagement.jwtRefreshTimeoutHours >= userManagement.jwtSessionDurationHo config.set('userManagement.jwtRefreshTimeoutHours', 0); } +if (config.getEnv('executions.process') !== 'IGNORED') { + throw new ApplicationError( + 'Own mode has been removed. If you need the isolation and performance gains, please consider using queue mode.', + ); +} setGlobalState({ defaultTimezone: config.getEnv('generic.timezone'), diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index 4402f82838..c4c1566b03 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -234,6 +234,14 @@ export const schema = { }, executions: { + // By default workflows get always executed in the main process. + // TODO: remove this and all usage of `executions.process` when we're sure that nobody has this in their config file anymore. + process: { + doc: 'Own mode has been removed and is only here for backwards compatibility of config files. N8n will use main mode for executions unless `executions.mode` is set to `queue`.', + format: ['main', 'own', 'IGNORED'] as const, + default: 'IGNORED', + env: 'EXECUTIONS_PROCESS', + }, mode: { doc: 'If it should run executions directly or via queue', format: ['regular', 'queue'] as const,