summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-04-22 13:07:41 +0100
committerGitHub <noreply@github.com>2020-04-22 13:07:41 +0100
commit51f7eaf908a84fcaf231899e2bf1beae14ae72c0 (patch)
treee7e14016f42d021542d1703415cf6e06804310eb /synapse/app
parentReduce logging verbosity of URL cache cleanup. (#7295) (diff)
downloadsynapse-51f7eaf908a84fcaf231899e2bf1beae14ae72c0.tar.xz
Add ability to run replication protocol over redis. (#7040)
This is configured via the `redis` config options.
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/homeserver.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 49df63acd0..cbd1ea475a 100644
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -273,6 +273,12 @@ class SynapseHomeServer(HomeServer):
     def start_listening(self, listeners):
         config = self.get_config()
 
+        if config.redis_enabled:
+            # If redis is enabled we connect via the replication command handler
+            # in the same way as the workers (since we're effectively a client
+            # rather than a server).
+            self.get_tcp_replication().start_replication(self)
+
         for listener in listeners:
             if listener["type"] == "http":
                 self._listening_services.extend(self._listener_http(config, listener))