diff options
author | Erik Johnston <erik@matrix.org> | 2020-05-18 12:24:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 12:24:48 +0100 |
commit | 51055c8c4409e70e8f310fce420b2f2f7f7a257a (patch) | |
tree | b460816865188f0a77722a72d804fac2c6daa6a9 /synapse/app | |
parent | Merge pull request #7519 from matrix-org/rav/kill_py2_code (diff) | |
download | synapse-51055c8c4409e70e8f310fce420b2f2f7f7a257a.tar.xz |
Allow ReplicationRestResource to be added to workers (#7515)
This allows workers to talk to each other over HTTP replication.
Diffstat (limited to 'synapse/app')
-rw-r--r-- | synapse/app/generic_worker.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index ab801108ca..506b70443b 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -47,6 +47,7 @@ from synapse.http.site import SynapseSite from synapse.logging.context import LoggingContext from synapse.metrics import METRICS_PREFIX, MetricsResource, RegistryProxy from synapse.metrics.background_process_metrics import run_as_background_process +from synapse.replication.http import REPLICATION_PREFIX, ReplicationRestResource from synapse.replication.slave.storage._base import BaseSlavedStore from synapse.replication.slave.storage.account_data import SlavedAccountDataStore from synapse.replication.slave.storage.appservice import SlavedApplicationServiceStore @@ -570,6 +571,9 @@ class GenericWorkerServer(HomeServer): if name in ["keys", "federation"]: resources[SERVER_KEY_V2_PREFIX] = KeyApiV2Resource(self) + if name == "replication": + resources[REPLICATION_PREFIX] = ReplicationRestResource(self) + root_resource = create_resource_tree(resources, NoResource()) _base.listen_tcp( |