Open bartoszhernas opened 1 year ago
Seems like if passing list of nodes with comma delimited list of nodes, it is not working anymore except when used as ENV.
I've added this patch to make it work for my use case:
diff --git a/node_modules/taskforce-connector/dist/queue-factory.js b/node_modules/taskforce-connector/dist/queue-factory.js index 9052c4b..4ef1623 100644 --- a/node_modules/taskforce-connector/dist/queue-factory.js +++ b/node_modules/taskforce-connector/dist/queue-factory.js @@ -75,6 +75,17 @@ exports.getRedisInfo = getRedisInfo; function getRedisClient(redisOpts, type, clusterNodes) { if (!redisClients[type]) { if (clusterNodes && clusterNodes.length) { + process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; + Object.assign(redisOpts, { + redisOptions: { + tls: { + cert: Buffer.from(process.env.REDIS_CLUSTER_TLS ?? '', 'base64').toString('ascii') + }, + } + }); + if (clusterNodes.constructor === String) { + clusterNodes = clusterNodes.split(",") + } redisClients[type] = new ioredis_1.Redis.Cluster(clusterNodes, redisOpts); } else {
The important bit is clusterNodes = clusterNodes.split(",")
clusterNodes = clusterNodes.split(",")
The tls fixes are for users of Redis Cluster on ScaleWay which uses TLS certificate for validating the connection.
tls
Seems like if passing list of nodes with comma delimited list of nodes, it is not working anymore except when used as ENV.
I've added this patch to make it work for my use case: