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

Commit

Permalink
Run cache_joined_hosts_for_event in background
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed May 7, 2021
1 parent 6c84778 commit 9e5ddf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/9951.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve performance of sending events for worker-based deployments using Redis.
2 changes: 1 addition & 1 deletion synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ async def handle_new_client_event(

await self.action_generator.handle_push_actions_for_event(event, context)

await self.cache_joined_hosts_for_event(event, context)
run_in_background(self.cache_joined_hosts_for_event, event, context)

try:
# If we're a worker we need to hit out to the master.
Expand Down

0 comments on commit 9e5ddf7

Please sign in to comment.