fix(core): Support redis cluster in queue mode (#6708)

* support redis cluster

* cleanup, fix config schema

* set default prefix to bull
This commit is contained in:
Michael Auerswald
2023-07-21 23:31:52 +02:00
committed by GitHub
parent 8ceb8322eb
commit 4029386349
4 changed files with 126 additions and 37 deletions

View File

@@ -353,9 +353,9 @@ export const schema = {
},
bull: {
prefix: {
doc: 'Prefix for all queue keys',
doc: 'Prefix for all queue keys (wrap in {} for cluster mode)',
format: String,
default: '',
default: 'bull',
env: 'QUEUE_BULL_PREFIX',
},
redis: {
@@ -395,6 +395,12 @@ export const schema = {
default: '',
env: 'QUEUE_BULL_REDIS_USERNAME',
},
clusterNodes: {
doc: 'Redis Cluster startup nodes (comma separated list of host:port pairs)',
format: String,
default: '',
env: 'QUEUE_BULL_REDIS_CLUSTER_NODES',
},
},
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.',