mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
parent
36f34e6f3d
commit
a90d16dabc
8 changed files with 118 additions and 58 deletions
|
@ -23,6 +23,7 @@ from twisted.internet import defer
|
|||
from synapse.api.errors import StoreError
|
||||
from synapse.logging.opentracing import (
|
||||
get_active_span_text_map,
|
||||
set_tag,
|
||||
trace,
|
||||
whitelisted_homeserver,
|
||||
)
|
||||
|
@ -321,6 +322,7 @@ class DeviceWorkerStore(SQLBaseStore):
|
|||
def get_device_stream_token(self):
|
||||
return self._device_list_id_gen.get_current_token()
|
||||
|
||||
@trace
|
||||
@defer.inlineCallbacks
|
||||
def get_user_devices_from_cache(self, query_list):
|
||||
"""Get the devices (and keys if any) for remote users from the cache.
|
||||
|
@ -352,6 +354,9 @@ class DeviceWorkerStore(SQLBaseStore):
|
|||
else:
|
||||
results[user_id] = yield self._get_cached_devices_for_user(user_id)
|
||||
|
||||
set_tag("in_cache", results)
|
||||
set_tag("not_in_cache", user_ids_not_in_cache)
|
||||
|
||||
return user_ids_not_in_cache, results
|
||||
|
||||
@cachedInlineCallbacks(num_args=2, tree=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue