diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-31 15:19:26 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-31 15:19:26 +0000 |
commit | cd581338cf2618d8480ce7ba6a2ffd4a5270b552 (patch) | |
tree | 533c0f5efcde3f06ea6e069c9d4ee8fb4f6ee231 /synapse/handlers/device.py | |
parent | Newsfile (diff) | |
parent | Merge pull request #6294 from matrix-org/erikj/add_state_storage (diff) | |
download | synapse-cd581338cf2618d8480ce7ba6a2ffd4a5270b552.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_purge_history
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 5f23ee4488..16b4617f68 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -46,6 +46,7 @@ class DeviceWorkerHandler(BaseHandler): self.hs = hs self.state = hs.get_state_handler() + self.state_store = hs.get_storage().state self._auth_handler = hs.get_auth_handler() @trace @@ -178,7 +179,7 @@ class DeviceWorkerHandler(BaseHandler): continue # mapping from event_id -> state_dict - prev_state_ids = yield self.store.get_state_ids_for_events(event_ids) + prev_state_ids = yield self.state_store.get_state_ids_for_events(event_ids) # Check if we've joined the room? If so we just blindly add all the users to # the "possibly changed" users. @@ -656,7 +657,7 @@ class DeviceListUpdater(object): except (NotRetryingDestination, RequestSendFailed, HttpResponseException): # TODO: Remember that we are now out of sync and try again # later - logger.warn("Failed to handle device list update for %s", user_id) + logger.warning("Failed to handle device list update for %s", user_id) # We abort on exceptions rather than accepting the update # as otherwise synapse will 'forget' that its device list # is out of date. If we bail then we will retry the resync @@ -694,7 +695,7 @@ class DeviceListUpdater(object): # up on storing the total list of devices and only handle the # delta instead. if len(devices) > 1000: - logger.warn( + logger.warning( "Ignoring device list snapshot for %s as it has >1K devs (%d)", user_id, len(devices), |