Node.js based forum software built for the modern web
feat: #9508, add cluster support
Barış Soner Uşaklı94c12e37716a
diff --git a/src/database/redis/connection.js b/src/database/redis/connection.jsindex 1c8179a346..6b43c9ee79 100644--- a/src/database/redis/connection.js+++ b/src/database/redis/connection.js@@ -12,7 +12,9 @@ connection.connect = async function (options) {const redis_socket_or_host = options.host;let cxn;- if (redis_socket_or_host && String(redis_socket_or_host).indexOf('/') >= 0) {+ if (options.cluster) {+ cxn = new Redis.Cluster(options.cluster, options.options);+ } else if (redis_socket_or_host && String(redis_socket_or_host).indexOf('/') >= 0) {// If redis.host contains a path name character, use the unix dom sock connection. ie, /tmp/redis.sockcxn = new Redis({...options.options,