fix(core): Give better error message if executions.process is still used in the configs (#8618)

This commit is contained in:
Danny Martini 2024-02-13 13:40:50 +01:00 committed by GitHub
parent b54488ada5
commit cd8ca8412d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -73,6 +73,11 @@ if (userManagement.jwtRefreshTimeoutHours >= userManagement.jwtSessionDurationHo
config.set('userManagement.jwtRefreshTimeoutHours', 0); 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({ setGlobalState({
defaultTimezone: config.getEnv('generic.timezone'), defaultTimezone: config.getEnv('generic.timezone'),

View file

@ -234,6 +234,14 @@ export const schema = {
}, },
executions: { 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: { mode: {
doc: 'If it should run executions directly or via queue', doc: 'If it should run executions directly or via queue',
format: ['regular', 'queue'] as const, format: ['regular', 'queue'] as const,