mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:56:05 -04:00
Allow moving typing off master (#7869)
This commit is contained in:
parent
649a7ead5c
commit
f2e38ca867
10 changed files with 282 additions and 176 deletions
|
@ -42,6 +42,7 @@ from synapse.replication.tcp.streams import (
|
|||
EventsStream,
|
||||
FederationStream,
|
||||
Stream,
|
||||
TypingStream,
|
||||
)
|
||||
from synapse.util.async_helpers import Linearizer
|
||||
|
||||
|
@ -96,6 +97,14 @@ class ReplicationCommandHandler:
|
|||
|
||||
continue
|
||||
|
||||
if isinstance(stream, TypingStream):
|
||||
# Only add TypingStream as a source on the instance in charge of
|
||||
# typing.
|
||||
if hs.config.worker.writers.typing == hs.get_instance_name():
|
||||
self._streams_to_replicate.append(stream)
|
||||
|
||||
continue
|
||||
|
||||
# Only add any other streams if we're on master.
|
||||
if hs.config.worker_app is not None:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue