Skip to content

Commit

Permalink
refactor(core): Warn on sqlite DB detected during init on queue mode (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
ivov authored Dec 15, 2023
1 parent f432d86 commit f18bc5f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/cli/src/commands/BaseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ??
Expand Down

0 comments on commit f18bc5f

Please sign in to comment.