mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-27 16:25:15 -04:00
Port receipt and read markers to async/wait
This commit is contained in:
parent
09a135b039
commit
2c35ffead2
6 changed files with 32 additions and 53 deletions
|
@ -2439,12 +2439,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue