diff options
author | Erik Johnston <erikj@matrix.org> | 2023-09-04 17:14:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-04 17:14:09 +0100 |
commit | d35bed8369514fe727b4fe1afb68f48cc8b2655a (patch) | |
tree | 7343ece3b82ac87a594865c4074623b45b0297b4 /synapse/handlers/typing.py | |
parent | Add last_seen_ts to the admin users API (#16218) (diff) | |
download | synapse-d35bed8369514fe727b4fe1afb68f48cc8b2655a.tar.xz |
Don't wake up destination transaction queue if they're not due for retry. (#16223)
Diffstat (limited to 'synapse/handlers/typing.py')
-rw-r--r-- | synapse/handlers/typing.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 7aeae5319c..4b4227003d 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -26,9 +26,10 @@ from synapse.metrics.background_process_metrics import ( ) from synapse.replication.tcp.streams import TypingStream from synapse.streams import EventSource -from synapse.types import JsonDict, Requester, StreamKeyType, UserID +from synapse.types import JsonDict, Requester, StrCollection, StreamKeyType, UserID from synapse.util.caches.stream_change_cache import StreamChangeCache from synapse.util.metrics import Measure +from synapse.util.retryutils import filter_destinations_by_retry_limiter from synapse.util.wheel_timer import WheelTimer if TYPE_CHECKING: @@ -150,8 +151,15 @@ class FollowerTypingHandler: now=now, obj=member, then=now + FEDERATION_PING_INTERVAL ) - hosts = await self._storage_controllers.state.get_current_hosts_in_room( - member.room_id + hosts: StrCollection = ( + await self._storage_controllers.state.get_current_hosts_in_room( + member.room_id + ) + ) + hosts = await filter_destinations_by_retry_limiter( + hosts, + clock=self.clock, + store=self.store, ) for domain in hosts: if not self.is_mine_server_name(domain): |