Skip to content

Node.js based forum software built for the modern web

feat: make it simpler to use redis sentinels

Barış Soner Uşaklı82389469f602
diff --git a/src/database/redis/connection.js b/src/database/redis/connection.js
index 6b43c9ee79..a4ba757ef6 100644
--- a/src/database/redis/connection.js
+++ b/src/database/redis/connection.js
@@ -14,6 +14,11 @@ connection.connect = async function (options) {
let cxn;
if (options.cluster) {
cxn = new Redis.Cluster(options.cluster, options.options);
+ } else if (options.sentinels) {
+ cxn = new Redis({
+ sentinels: options.sentinels,
+ ...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.sock
cxn = new Redis({