summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-16 17:34:44 +0000
committerErik Johnston <erik@matrix.org>2016-11-16 17:34:44 +0000
commited787cf09edd77e39ad9da0b957359214de85287 (patch)
treebefff8fe0284099e1e2df9eccd729ff1eedd4727 /synapse/server.py
parentAdd initial cut of federation send queue (diff)
downloadsynapse-ed787cf09edd77e39ad9da0b957359214de85287.tar.xz
Hook up the send queue and create a federation sender worker
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 faab617b4f..6c57ab3e18 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -32,6 +32,7 @@ from synapse.appservice.scheduler import ApplicationServiceScheduler
 from synapse.crypto.keyring import Keyring
 from synapse.events.builder import EventBuilderFactory
 from synapse.federation import initialize_http_replication
+from synapse.federation.send_queue import FederationRemoteSendQueue
 from synapse.federation.transport.client import TransportLayerClient
 from synapse.federation.transaction_queue import TransactionQueue
 from synapse.handlers import Handlers
@@ -273,7 +274,10 @@ class HomeServer(object):
         return TransportLayerClient(self)
 
     def build_federation_sender(self):
-        return TransactionQueue(self)
+        if self.config.send_federation:
+            return TransactionQueue(self)
+        else:
+            return FederationRemoteSendQueue(self)
 
     def remove_pusher(self, app_id, push_key, user_id):
         return self.get_pusherpool().remove_pusher(app_id, push_key, user_id)