diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-10-22 16:12:11 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-10-22 16:12:11 +0100 |
commit | e7a16c6210191e9556fb1c11cbff2d98f0a5206c (patch) | |
tree | 306f39afc6b054f22d04076278c44153865d8e08 /synapse/app | |
parent | Give pushers their own background logcontext (diff) | |
download | synapse-e7a16c6210191e9556fb1c11cbff2d98f0a5206c.tar.xz |
Remove redundant run_as_background_process() from pusherpool
`on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough.
Diffstat (limited to 'synapse/app')
-rw-r--r-- | synapse/app/pusher.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py index e06b70894e..83b0863f00 100644 --- a/synapse/app/pusher.py +++ b/synapse/app/pusher.py @@ -161,11 +161,11 @@ class PusherReplicationHandler(ReplicationClientHandler): else: yield self.start_pusher(row.user_id, row.app_id, row.pushkey) elif stream_name == "events": - self.pusher_pool.on_new_notifications( + yield self.pusher_pool.on_new_notifications( token, token, ) elif stream_name == "receipts": - self.pusher_pool.on_new_receipts( + yield self.pusher_pool.on_new_receipts( token, token, set(row.room_id for row in rows) ) except Exception: |