From f18bc5f4b7779ab49e44f223c3f2c0f7e4341db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 15 Dec 2023 10:56:35 +0100 Subject: [PATCH] refactor(core): Warn on sqlite DB detected during init on queue mode (#8034) When setting up queue mode, it is easy to overlook that not exporting Postgres env vars will default the worker to use sqlite, which will fail during execution with a non-obvious error. Hence add warnings when starting a worker with an incompatible DB type. --- packages/cli/src/commands/BaseCommand.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/cli/src/commands/BaseCommand.ts b/packages/cli/src/commands/BaseCommand.ts index 413c2e5307..fc8b28c0df 100644 --- a/packages/cli/src/commands/BaseCommand.ts +++ b/packages/cli/src/commands/BaseCommand.ts @@ -80,6 +80,12 @@ export abstract class BaseCommand extends Command { ); } + if (config.getEnv('executions.mode') === 'queue' && dbType === 'sqlite') { + this.logger.warn( + 'Queue mode is not officially supported with sqlite. Please switch to PostgreSQL.', + ); + } + if ( process.env.N8N_BINARY_DATA_TTL ?? process.env.N8N_PERSISTED_BINARY_DATA_TTL ??