mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 15:13:52 +01:00
Fixup diff
This commit is contained in:
parent
842c2cfbf1
commit
dac148341b
1 changed files with 7 additions and 6 deletions
|
@ -536,14 +536,15 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
|
||||||
Deferred[(int, int, str)]:
|
Deferred[(int, int, str)]:
|
||||||
(stream ordering, topological ordering, event_id)
|
(stream ordering, topological ordering, event_id)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _f(txn):
|
def _f(txn):
|
||||||
sql = (
|
sql = (
|
||||||
"SELECT stream_ordering, topological_ordering, event_id"
|
"SELECT stream_ordering, topological_ordering, event_id"
|
||||||
" FROM events"
|
" FROM events"
|
||||||
" WHERE room_id = ? AND stream_ordering <= ?"
|
" WHERE room_id = ? AND stream_ordering <= ?"
|
||||||
" AND NOT outlier"
|
" AND NOT outlier"
|
||||||
" ORDER BY stream_ordering DESC"
|
" ORDER BY stream_ordering DESC"
|
||||||
" LIMIT 1"
|
" LIMIT 1"
|
||||||
)
|
)
|
||||||
txn.execute(sql, (room_id, stream_ordering))
|
txn.execute(sql, (room_id, stream_ordering))
|
||||||
return txn.fetchone()
|
return txn.fetchone()
|
||||||
|
|
Loading…
Reference in a new issue