diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-21 15:38:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-21 15:38:08 +0100 |
commit | 6189d8e54d7f7d55cd6cd2e9d7f866e895c6fe44 (patch) | |
tree | bbb60f05993ba20419d250be764ed126c20b99fa /synapse/storage/event_federation.py | |
parent | Correctly capture Queue.Empty exception (diff) | |
download | synapse-6189d8e54d7f7d55cd6cd2e9d7f866e895c6fe44.tar.xz |
PriorityQueue gives lowest first
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r-- | synapse/storage/event_federation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py index e171cbcdb4..03942fec7a 100644 --- a/synapse/storage/event_federation.py +++ b/synapse/storage/event_federation.py @@ -395,7 +395,7 @@ class EventFederationStore(SQLBaseStore): ) for row in txn.fetchall(): - queue.put(row) + queue.put((-row[0], row[1])) while not queue.empty() and len(event_results) < limit: try: @@ -411,7 +411,7 @@ class EventFederationStore(SQLBaseStore): ) for row in txn.fetchall(): - queue.put(row) + queue.put((-row[0], row[1])) return event_results |