diff options
author | Erik Johnston <erikj@jki.re> | 2016-10-11 15:41:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 15:41:55 +0100 |
commit | e641115421b44c567bc0f1ca8d39a83e32891383 (patch) | |
tree | 51a8cb5ed3f294887bdcc2d6ef36efcad186af07 /synapse/app/pusher.py | |
parent | Merge pull request #1166 from matrix-org/rav/grandfather_broken_riot_signup (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/replicatio... (diff) | |
download | synapse-e641115421b44c567bc0f1ca8d39a83e32891383.tar.xz |
Merge pull request #1141 from matrix-org/erikj/replication_noop
Reduce DB hits for replication
Diffstat (limited to 'synapse/app/pusher.py')
-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 d59f4a571c..1a6f5507a9 100644 --- a/synapse/app/pusher.py +++ b/synapse/app/pusher.py @@ -197,7 +197,7 @@ class PusherServer(HomeServer): yield start_pusher(user_id, app_id, pushkey) stream = results.get("events") - if stream: + if stream and stream["rows"]: min_stream_id = stream["rows"][0][0] max_stream_id = stream["position"] preserve_fn(pusher_pool.on_new_notifications)( @@ -205,7 +205,7 @@ class PusherServer(HomeServer): ) stream = results.get("receipts") - if stream: + if stream and stream["rows"]: rows = stream["rows"] affected_room_ids = set(row[1] for row in rows) min_stream_id = rows[0][0] |