summary refs log tree commit diff
path: root/synapse/push/httppusher.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-02-17 16:31:57 +0000
committerRichard van der Hoff <richard@matrix.org>2021-02-17 16:31:57 +0000
commit7b7831bb6363a625c97446298838c66abfeb6b8b (patch)
tree39ec72cc7b8985858012f5d77fb89796fb04ff43 /synapse/push/httppusher.py
parentEnsure that we never stop reconnecting to redis (#9391) (diff)
parentReorganize CONTRIBUTING.md documentation. (#9281) (diff)
downloadsynapse-7b7831bb6363a625c97446298838c66abfeb6b8b.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r--synapse/push/httppusher.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index 9fa26fe9f8..ed911f106a 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -181,8 +181,10 @@ class HttpPusher(Pusher):
         Never call this directly: use _process which will only allow this to
         run once per pusher.
         """
-        unprocessed = await self.store.get_unread_push_actions_for_user_in_range_for_http(
-            self.user_id, self.last_stream_ordering, self.max_stream_ordering
+        unprocessed = (
+            await self.store.get_unread_push_actions_for_user_in_range_for_http(
+                self.user_id, self.last_stream_ordering, self.max_stream_ordering
+            )
         )
 
         logger.info(
@@ -209,12 +211,14 @@ class HttpPusher(Pusher):
                 http_push_processed_counter.inc()
                 self.backoff_delay = HttpPusher.INITIAL_BACKOFF_SEC
                 self.last_stream_ordering = push_action["stream_ordering"]
-                pusher_still_exists = await self.store.update_pusher_last_stream_ordering_and_success(
-                    self.app_id,
-                    self.pushkey,
-                    self.user_id,
-                    self.last_stream_ordering,
-                    self.clock.time_msec(),
+                pusher_still_exists = (
+                    await self.store.update_pusher_last_stream_ordering_and_success(
+                        self.app_id,
+                        self.pushkey,
+                        self.user_id,
+                        self.last_stream_ordering,
+                        self.clock.time_msec(),
+                    )
                 )
                 if not pusher_still_exists:
                     # The pusher has been deleted while we were processing, so
@@ -295,7 +299,8 @@ class HttpPusher(Pusher):
                     # for sanity, we only remove the pushkey if it
                     # was the one we actually sent...
                     logger.warning(
-                        ("Ignoring rejected pushkey %s because we didn't send it"), pk,
+                        ("Ignoring rejected pushkey %s because we didn't send it"),
+                        pk,
                     )
                 else:
                     logger.info("Pushkey %s was rejected: removing", pk)