diff options
author | Erik Johnston <erikj@jki.re> | 2017-07-06 18:08:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-06 18:08:43 +0100 |
commit | 58dc1f2c78e1ec6c4af18bcb10449d758e70a411 (patch) | |
tree | a71c229f4de9bdf3d2fa09fb79df1cb3eb001a41 /synapse/handlers | |
parent | Merge pull request #2309 from matrix-org/erikj/user_ip_repl (diff) | |
parent | Fix bug where pusherpool didn't start and broke some rooms (diff) | |
download | synapse-58dc1f2c78e1ec6c4af18bcb10449d758e70a411.tar.xz |
Merge pull request #2342 from matrix-org/erikj/pusher_pool_instantiate
Fix bug where pusherpool didn't start and broke some rooms
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/federation.py | 3 | ||||
-rw-r--r-- | synapse/handlers/message.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 483cb8eac6..694b820d85 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -76,6 +76,7 @@ class FederationHandler(BaseHandler): self.keyring = hs.get_keyring() self.action_generator = hs.get_action_generator() self.is_mine_id = hs.is_mine_id + self.pusher_pool = hs.get_pusherpool() self.replication_layer.set_handler(self) @@ -1426,7 +1427,7 @@ class FederationHandler(BaseHandler): if not backfilled: # this intentionally does not yield: we don't care about the result # and don't need to wait for it. - preserve_fn(self.hs.get_pusherpool().on_new_notifications)( + preserve_fn(self.pusher_pool.on_new_notifications)( event_stream_id, max_stream_id ) diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 24c9ffdb20..be4f123c54 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -50,6 +50,8 @@ class MessageHandler(BaseHandler): self.pagination_lock = ReadWriteLock() + self.pusher_pool = hs.get_pusherpool() + # We arbitrarily limit concurrent event creation for a room to 5. # This is to stop us from diverging history *too* much. self.limiter = Limiter(max_count=5) @@ -610,7 +612,7 @@ class MessageHandler(BaseHandler): # this intentionally does not yield: we don't care about the result # and don't need to wait for it. - preserve_fn(self.hs.get_pusherpool().on_new_notifications)( + preserve_fn(self.pusher_pool.on_new_notifications)( event_stream_id, max_stream_id ) |