diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-20 18:02:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 18:02:18 +0000 |
commit | 65d03866936adb144631d263a8539a2cb060fd43 (patch) | |
tree | 894f71640642a5bf444d475bbb7831cc512d9b13 /synapse/server.py | |
parent | Dockerfile: Bump Python version from 3.9 to 3.11 (#14875) (diff) | |
download | synapse-65d03866936adb144631d263a8539a2cb060fd43.tar.xz |
Always notify replication when a stream advances (#14877)
This ensures that all other workers are told about stream updates in a timely manner, without having to remember to manually poke replication.
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py index f4ab94c4f3..9d6d268f49 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -107,7 +107,7 @@ from synapse.http.client import InsecureInterceptableContextFactory, SimpleHttpC from synapse.http.matrixfederationclient import MatrixFederationHttpClient from synapse.metrics.common_usage_metrics import CommonUsageMetricsManager from synapse.module_api import ModuleApi -from synapse.notifier import Notifier +from synapse.notifier import Notifier, ReplicationNotifier from synapse.push.bulk_push_rule_evaluator import BulkPushRuleEvaluator from synapse.push.pusherpool import PusherPool from synapse.replication.tcp.client import ReplicationDataHandler @@ -390,6 +390,10 @@ class HomeServer(metaclass=abc.ABCMeta): return Notifier(self) @cache_in_self + def get_replication_notifier(self) -> ReplicationNotifier: + return ReplicationNotifier() + + @cache_in_self def get_auth(self) -> Auth: return Auth(self) |