diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-01-16 20:25:09 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-01-16 20:25:09 +0000 |
commit | dac148341ba2638cc9486cf0b00005932dab939d (patch) | |
tree | 2565017add0020464f126dc3d40b2fb5be36065e /synapse/storage/data_stores | |
parent | Remove get_room_event_after_stream_ordering entirely (diff) | |
download | synapse-dac148341ba2638cc9486cf0b00005932dab939d.tar.xz |
Fixup diff
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/main/stream.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/storage/data_stores/main/stream.py b/synapse/storage/data_stores/main/stream.py index a20c3d1012..056b25b13a 100644 --- a/synapse/storage/data_stores/main/stream.py +++ b/synapse/storage/data_stores/main/stream.py @@ -536,14 +536,15 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore): Deferred[(int, int, str)]: (stream ordering, topological ordering, event_id) """ + def _f(txn): sql = ( - "SELECT stream_ordering, topological_ordering, event_id" - " FROM events" - " WHERE room_id = ? AND stream_ordering <= ?" - " AND NOT outlier" - " ORDER BY stream_ordering DESC" - " LIMIT 1" + "SELECT stream_ordering, topological_ordering, event_id" + " FROM events" + " WHERE room_id = ? AND stream_ordering <= ?" + " AND NOT outlier" + " ORDER BY stream_ordering DESC" + " LIMIT 1" ) txn.execute(sql, (room_id, stream_ordering)) return txn.fetchone() |