mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:45:01 -04:00
Enable passing typing stream writers as a list. (#11237)
This makes the typing stream writer config match the other stream writers that only currently support a single worker.
This commit is contained in:
parent
2735b3e6f2
commit
af54167516
8 changed files with 24 additions and 16 deletions
|
@ -463,7 +463,7 @@ class HomeServer(metaclass=abc.ABCMeta):
|
|||
|
||||
@cache_in_self
|
||||
def get_typing_writer_handler(self) -> TypingWriterHandler:
|
||||
if self.config.worker.writers.typing == self.get_instance_name():
|
||||
if self.get_instance_name() in self.config.worker.writers.typing:
|
||||
return TypingWriterHandler(self)
|
||||
else:
|
||||
raise Exception("Workers cannot write typing")
|
||||
|
@ -474,7 +474,7 @@ class HomeServer(metaclass=abc.ABCMeta):
|
|||
|
||||
@cache_in_self
|
||||
def get_typing_handler(self) -> FollowerTypingHandler:
|
||||
if self.config.worker.writers.typing == self.get_instance_name():
|
||||
if self.get_instance_name() in self.config.worker.writers.typing:
|
||||
# Use get_typing_writer_handler to ensure that we use the same
|
||||
# cached version.
|
||||
return self.get_typing_writer_handler()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue