summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-08-15 14:59:02 +0100
committerGitHub <noreply@github.com>2018-08-15 14:59:02 +0100
commitdc56c47dc0991c4ddd5de59224c5f55c8fad5287 (patch)
tree083791ba6e3b5a80e4b8d51482b986e30bddd309 /synapse/server.py
parentMerge pull request #3687 from matrix-org/neilj/admin_email (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/split_fede... (diff)
downloadsynapse-dc56c47dc0991c4ddd5de59224c5f55c8fad5287.tar.xz
Merge pull request #3653 from matrix-org/erikj/split_federation
Move more federation APIs to workers
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 140be9ebe8..26228d8c72 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -36,6 +36,7 @@ from synapse.federation.federation_client import FederationClient
 from synapse.federation.federation_server import (
     FederationHandlerRegistry,
     FederationServer,
+    ReplicationFederationHandlerRegistry,
 )
 from synapse.federation.send_queue import FederationRemoteSendQueue
 from synapse.federation.transaction_queue import TransactionQueue
@@ -423,7 +424,10 @@ class HomeServer(object):
         return RoomMemberMasterHandler(self)
 
     def build_federation_registry(self):
-        return FederationHandlerRegistry()
+        if self.config.worker_app:
+            return ReplicationFederationHandlerRegistry(self)
+        else:
+            return FederationHandlerRegistry()
 
     def build_server_notices_manager(self):
         if self.config.worker_app: