Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_out_persistence_store

This commit is contained in:
Erik Johnston 2019-10-30 13:37:04 +00:00
commit ec6de1cc7d
146 changed files with 1245 additions and 722 deletions

View file

@ -1881,12 +1881,11 @@ class EventsStore(
logger.info("[purge] done")
@defer.inlineCallbacks
def is_event_after(self, event_id1, event_id2):
async def is_event_after(self, event_id1, event_id2):
"""Returns True if event_id1 is after event_id2 in the stream
"""
to_1, so_1 = yield self._get_event_ordering(event_id1)
to_2, so_2 = yield self._get_event_ordering(event_id2)
to_1, so_1 = await self._get_event_ordering(event_id1)
to_2, so_2 = await self._get_event_ordering(event_id2)
return (to_1, so_1) > (to_2, so_2)
@cachedInlineCallbacks(max_entries=5000)