Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add an assert to check that limit has been enforced after calling get…
Browse files Browse the repository at this point in the history
…_devices_by_remote

Signed-off-by: Quentin Dufour <[email protected]>
  • Loading branch information
superboum committed May 9, 2019
1 parent a363b8c commit 47b8871
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synapse/federation/sender/per_destination_queue.py
Original file line number Diff line number Diff line change
@@ -362,6 +362,8 @@ def _get_new_device_messages(self, limit):
for content in results
]

assert len(edus) <= limit, "get_devices_by_remote returned too many EDUs"

last_device_stream_id = self._last_device_stream_id
to_device_stream_id = self._store.get_to_device_stream_token()
contents, stream_id = yield self._store.get_new_device_msgs_for_remote(

0 comments on commit 47b8871

Please sign in to comment.