diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-24 10:59:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 10:59:51 -0400 |
commit | b975fa2e9952f1f8ac2cddb15c287768bf9b0b4e (patch) | |
tree | 7d1965dcddbd0a028b4b1c378830fb3dedbe5685 /synapse/storage/persist_events.py | |
parent | Fix up types and comments that refer to Deferreds. (#7945) (diff) | |
download | synapse-b975fa2e9952f1f8ac2cddb15c287768bf9b0b4e.tar.xz |
Convert state resolution to async/await (#7942)
Diffstat (limited to 'synapse/storage/persist_events.py')
-rw-r--r-- | synapse/storage/persist_events.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/persist_events.py b/synapse/storage/persist_events.py index fa46041676..78fbdcdee8 100644 --- a/synapse/storage/persist_events.py +++ b/synapse/storage/persist_events.py @@ -29,7 +29,6 @@ from synapse.events import FrozenEvent from synapse.events.snapshot import EventContext from synapse.logging.context import PreserveLoggingContext, make_deferred_yieldable from synapse.metrics.background_process_metrics import run_as_background_process -from synapse.state import StateResolutionStore from synapse.storage.data_stores import DataStores from synapse.storage.data_stores.main.events import DeltaState from synapse.types import StateMap @@ -648,6 +647,10 @@ class EventsPersistenceStorage(object): room_version = await self.main_store.get_room_version_id(room_id) logger.debug("calling resolve_state_groups from preserve_events") + + # Avoid a circular import. + from synapse.state import StateResolutionStore + res = await self._state_resolution_handler.resolve_state_groups( room_id, room_version, |