mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 17:34:49 -04:00
PriorityQueue gives lowest first
This commit is contained in:
parent
115ef3ddac
commit
6189d8e54d
1 changed files with 2 additions and 2 deletions
|
@ -395,7 +395,7 @@ class EventFederationStore(SQLBaseStore):
|
||||||
)
|
)
|
||||||
|
|
||||||
for row in txn.fetchall():
|
for row in txn.fetchall():
|
||||||
queue.put(row)
|
queue.put((-row[0], row[1]))
|
||||||
|
|
||||||
while not queue.empty() and len(event_results) < limit:
|
while not queue.empty() and len(event_results) < limit:
|
||||||
try:
|
try:
|
||||||
|
@ -411,7 +411,7 @@ class EventFederationStore(SQLBaseStore):
|
||||||
)
|
)
|
||||||
|
|
||||||
for row in txn.fetchall():
|
for row in txn.fetchall():
|
||||||
queue.put(row)
|
queue.put((-row[0], row[1]))
|
||||||
|
|
||||||
return event_results
|
return event_results
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue