diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-05-14 11:12:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 11:12:36 +0100 |
commit | 5090f26b636bf4439575767a2272d033fb33b2d5 (patch) | |
tree | 11ed4623449a07d80598ceadcc923ddfa6dd63a2 /synapse/storage/databases/main/devices.py | |
parent | Remove unnecessary SystemRandom from SQLBaseStore (#9987) (diff) | |
download | synapse-5090f26b636bf4439575767a2272d033fb33b2d5.tar.xz |
Minor `@cachedList` enhancements (#9975)
- use a tuple rather than a list for the iterable that is passed into the wrapped function, for performance - test that we can pass an iterable and that keys are correctly deduped.
Diffstat (limited to 'synapse/storage/databases/main/devices.py')
-rw-r--r-- | synapse/storage/databases/main/devices.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py index c9346de316..a1f98b7e38 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py @@ -665,7 +665,7 @@ class DeviceWorkerStore(SQLBaseStore): cached_method_name="get_device_list_last_stream_id_for_remote", list_name="user_ids", ) - async def get_device_list_last_stream_id_for_remotes(self, user_ids: str): + async def get_device_list_last_stream_id_for_remotes(self, user_ids: Iterable[str]): rows = await self.db_pool.simple_select_many_batch( table="device_lists_remote_extremeties", column="user_id", |