summary refs log tree commit diff
path: root/synapse/app/pusher.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-04-27 14:18:00 +0100
committerRichard van der Hoff <richard@matrix.org>2018-04-27 14:18:00 +0100
commit61463323871ccbe17f8933c1695d7901cd6a8a20 (patch)
treed70648dd1b7466452da27a4b7d8993c58481ed03 /synapse/app/pusher.py
parentMerge branch 'develop' into rav/deferred_timeout (diff)
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-61463323871ccbe17f8933c1695d7901cd6a8a20.tar.xz
Merge remote-tracking branch 'origin/develop' into rav/deferred_timeout
Diffstat (limited to 'synapse/app/pusher.py')
-rw-r--r--synapse/app/pusher.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py
index d5c3a85195..739d113ad5 100644
--- a/synapse/app/pusher.py
+++ b/synapse/app/pusher.py
@@ -144,20 +144,23 @@ class PusherReplicationHandler(ReplicationClientHandler):
 
     @defer.inlineCallbacks
     def poke_pushers(self, stream_name, token, rows):
-        if stream_name == "pushers":
-            for row in rows:
-                if row.deleted:
-                    yield self.stop_pusher(row.user_id, row.app_id, row.pushkey)
-                else:
-                    yield self.start_pusher(row.user_id, row.app_id, row.pushkey)
-        elif stream_name == "events":
-            yield self.pusher_pool.on_new_notifications(
-                token, token,
-            )
-        elif stream_name == "receipts":
-            yield self.pusher_pool.on_new_receipts(
-                token, token, set(row.room_id for row in rows)
-            )
+        try:
+            if stream_name == "pushers":
+                for row in rows:
+                    if row.deleted:
+                        yield self.stop_pusher(row.user_id, row.app_id, row.pushkey)
+                    else:
+                        yield self.start_pusher(row.user_id, row.app_id, row.pushkey)
+            elif stream_name == "events":
+                yield self.pusher_pool.on_new_notifications(
+                    token, token,
+                )
+            elif stream_name == "receipts":
+                yield self.pusher_pool.on_new_receipts(
+                    token, token, set(row.room_id for row in rows)
+                )
+        except Exception:
+            logger.exception("Error poking pushers")
 
     def stop_pusher(self, user_id, app_id, pushkey):
         key = "%s:%s" % (app_id, pushkey)