Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improve tracing for to device messages #9686

Merged
merged 7 commits into from
Apr 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion synapse/handlers/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

from synapse.api.errors import AuthError, ShadowBanError, SynapseError
from synapse.appservice import ApplicationService
from synapse.metrics.background_process_metrics import run_as_background_process
from synapse.metrics.background_process_metrics import (
run_as_background_process,
wrap_as_background_process,
)
from synapse.replication.tcp.streams import TypingStream
from synapse.types import JsonDict, Requester, UserID, get_domain_from_id
from synapse.util.caches.stream_change_cache import StreamChangeCache
Expand Down Expand Up @@ -86,6 +89,7 @@ def _reset(self) -> None:
self._member_last_federation_poke = {}
self.wheel_timer = WheelTimer(bucket_size=5000)

@wrap_as_background_process("typing.run_as_background_process")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "typing._handle_timeouts" or similar instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... yes

def _handle_timeouts(self) -> None:
logger.debug("Checking for typing timeouts")

Expand Down