mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 10:32:17 -08:00
feat(core): Add compatibility to redis > 6 ACLs system using username in queue-mode (#5048)
feat(redis): add compatibility to redis > 6 ACLs system using username Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
parent
e1f9349c19
commit
0ec66bfb42
|
@ -350,6 +350,7 @@ export class Start extends Command {
|
|||
|
||||
if (config.getEnv('executions.mode') === 'queue') {
|
||||
const redisHost = config.getEnv('queue.bull.redis.host');
|
||||
const redisUsername = config.getEnv('queue.bull.redis.username');
|
||||
const redisPassword = config.getEnv('queue.bull.redis.password');
|
||||
const redisPort = config.getEnv('queue.bull.redis.port');
|
||||
const redisDB = config.getEnv('queue.bull.redis.db');
|
||||
|
@ -383,6 +384,9 @@ export class Start extends Command {
|
|||
if (redisHost) {
|
||||
settings.host = redisHost;
|
||||
}
|
||||
if (redisUsername) {
|
||||
settings.username = redisUsername;
|
||||
}
|
||||
if (redisPassword) {
|
||||
settings.password = redisPassword;
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ export class Webhook extends Command {
|
|||
|
||||
if (config.getEnv('executions.mode') === 'queue') {
|
||||
const redisHost = config.getEnv('queue.bull.redis.host');
|
||||
const redisUsername = config.getEnv('queue.bull.redis.username');
|
||||
const redisPassword = config.getEnv('queue.bull.redis.password');
|
||||
const redisPort = config.getEnv('queue.bull.redis.port');
|
||||
const redisDB = config.getEnv('queue.bull.redis.db');
|
||||
|
@ -192,6 +193,9 @@ export class Webhook extends Command {
|
|||
if (redisHost) {
|
||||
settings.host = redisHost;
|
||||
}
|
||||
if (redisUsername) {
|
||||
settings.username = redisUsername;
|
||||
}
|
||||
if (redisPassword) {
|
||||
settings.password = redisPassword;
|
||||
}
|
||||
|
|
|
@ -380,6 +380,12 @@ export const schema = {
|
|||
default: 10000,
|
||||
env: 'QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD',
|
||||
},
|
||||
username: {
|
||||
doc: 'Redis Username (needs Redis >= 6)',
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'QUEUE_BULL_REDIS_USERNAME',
|
||||
},
|
||||
},
|
||||
queueRecoveryInterval: {
|
||||
doc: 'If > 0 enables an active polling to the queue that can recover for Redis crashes. Given in seconds; 0 is disabled. May increase Redis traffic significantly.',
|
||||
|
|
Loading…
Reference in a new issue