diff options
author | Erik Johnston <erik@matrix.org> | 2020-03-04 16:22:39 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-03-24 14:17:18 +0000 |
commit | ef4f063687a0228eb049a3253f1f38597e066a0a (patch) | |
tree | eba21c40424a92ee01cc7c7d857212e053175cd1 /synapse/server.py | |
parent | mypy (diff) | |
download | synapse-ef4f063687a0228eb049a3253f1f38597e066a0a.tar.xz |
Move command processing out of transport
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py index 392f9e8e38..5f5d79161c 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -85,6 +85,11 @@ from synapse.http.matrixfederationclient import MatrixFederationHttpClient from synapse.notifier import Notifier from synapse.push.action_generator import ActionGenerator from synapse.push.pusherpool import PusherPool +from synapse.replication.tcp.handler import ( + DummyReplicationDataHandler, + ReplicationClientHandler, +) +from synapse.replication.tcp.resource import ReplicationStreamer from synapse.rest.media.v1.media_repository import ( MediaRepository, MediaRepositoryResource, @@ -200,6 +205,8 @@ class HomeServer(object): "saml_handler", "event_client_serializer", "storage", + "replication_streamer", + "replication_data_handler", ] REQUIRED_ON_MASTER_STARTUP = ["user_directory_handler", "stats_handler"] @@ -459,7 +466,7 @@ class HomeServer(object): return ReadMarkerHandler(self) def build_tcp_replication(self): - raise NotImplementedError() + return ReplicationClientHandler(self) def build_action_generator(self): return ActionGenerator(self) @@ -544,6 +551,12 @@ class HomeServer(object): def build_storage(self) -> Storage: return Storage(self, self.datastores) + def build_replication_streamer(self) -> ReplicationStreamer: + return ReplicationStreamer(self) + + def build_replication_data_handler(self): + return DummyReplicationDataHandler() + def remove_pusher(self, app_id, push_key, user_id): return self.get_pusherpool().remove_pusher(app_id, push_key, user_id) |