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.
This commit is contained in:
Iván Ovejero 2023-12-15 10:56:35 +01:00 committed by GitHub
parent f432d86524
commit f18bc5f4b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ??