mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 16:34:48 -04:00
Use the same path for incremental with gap or without gap
This commit is contained in:
parent
b97f6626b6
commit
aca3193efb
3 changed files with 147 additions and 212 deletions
|
@ -179,7 +179,7 @@ class StreamStore(SQLBaseStore):
|
|||
room_ids = list(room_ids)
|
||||
for rm_ids in (room_ids[i:i+20] for i in xrange(0, len(room_ids), 20)):
|
||||
res = yield defer.gatherResults([
|
||||
self.get_recent_room_events_stream_for_room(
|
||||
self.get_room_events_stream_for_room(
|
||||
room_id, from_key, to_key, limit
|
||||
).addCallback(lambda r, rm: (rm, r), room_id)
|
||||
for room_id in room_ids
|
||||
|
@ -189,7 +189,7 @@ class StreamStore(SQLBaseStore):
|
|||
defer.returnValue(results)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_recent_room_events_stream_for_room(self, room_id, from_key, to_key, limit=0):
|
||||
def get_room_events_stream_for_room(self, room_id, from_key, to_key, limit=0):
|
||||
if from_key is not None:
|
||||
from_id = RoomStreamToken.parse_stream_token(from_key).stream
|
||||
else:
|
||||
|
@ -246,7 +246,7 @@ class StreamStore(SQLBaseStore):
|
|||
key = from_key
|
||||
|
||||
return ret, key
|
||||
res = yield self.runInteraction("get_recent_room_events_stream_for_room", f)
|
||||
res = yield self.runInteraction("get_room_events_stream_for_room", f)
|
||||
defer.returnValue(res)
|
||||
|
||||
def get_room_changes_for_user(self, user_id, from_key, to_key):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue