summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
author999lakhisidhu <42063995+999lakhisidhu@users.noreply.github.com>2023-02-15 16:39:31 +0400
committerGitHub <noreply@github.com>2023-02-15 07:39:31 -0500
commit27a3a72a50cb24f25e48fad1e6e79aba2cd1bea2 (patch)
treee640256d7a26f03bcec1a7bbbf8711ecebb54f49 /synapse
parentUpdate the error code for duplicate annotation (#15075) (diff)
downloadsynapse-27a3a72a50cb24f25e48fad1e6e79aba2cd1bea2.tar.xz
Support for selecting the Redis logical database. (#15034)
Note that this is only used for key-value store (cached values)
and not for the pub/sub replication used by Synapse.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/redis.py1
-rw-r--r--synapse/server.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/synapse/config/redis.py b/synapse/config/redis.py
index b42dd2e93a..e6a75be434 100644
--- a/synapse/config/redis.py
+++ b/synapse/config/redis.py
@@ -33,4 +33,5 @@ class RedisConfig(Config):
 
         self.redis_host = redis_config.get("host", "localhost")
         self.redis_port = redis_config.get("port", 6379)
+        self.redis_dbid = redis_config.get("dbid", None)
         self.redis_password = redis_config.get("password")
diff --git a/synapse/server.py b/synapse/server.py
index efc6b5f895..e5a3475247 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -827,6 +827,7 @@ class HomeServer(metaclass=abc.ABCMeta):
             hs=self,
             host=self.config.redis.redis_host,
             port=self.config.redis.redis_port,
+            dbid=self.config.redis.redis_dbid,
             password=self.config.redis.redis_password,
             reconnect=True,
         )