|
24 | 24 |
|
25 | 25 | from synapse.logging.opentracing import log_kv, set_tag, trace |
26 | 26 | from synapse.storage._base import SQLBaseStore, db_to_json |
27 | | -from synapse.storage.database import LoggingTransaction, make_in_list_sql_clause |
| 27 | +from synapse.storage.database import make_in_list_sql_clause |
28 | 28 | from synapse.types import JsonDict |
29 | 29 | from synapse.util import json_encoder |
30 | 30 | from synapse.util.caches.descriptors import cached, cachedList |
@@ -58,18 +58,13 @@ async def get_e2e_device_keys_for_federation_query( |
58 | 58 | Returns: |
59 | 59 | (stream_id, devices) |
60 | 60 | """ |
61 | | - return await self.db_pool.runInteraction( |
62 | | - "get_e2e_device_keys_for_federation_query", |
63 | | - self._get_e2e_device_keys_for_federation_query_txn, |
64 | | - user_id, |
65 | | - ) |
66 | | - |
67 | | - def _get_e2e_device_keys_for_federation_query_txn( |
68 | | - self, txn: LoggingTransaction, user_id: str |
69 | | - ) -> Tuple[int, List[JsonDict]]: |
70 | 61 | now_stream_id = self.get_device_stream_token() |
71 | 62 |
|
72 | | - devices = self._get_e2e_device_keys_and_signatures_txn(txn, [(user_id, None)]) |
| 63 | + devices = await self.db_pool.runInteraction( |
| 64 | + "get_e2e_device_keys_and_signatures_txn", |
| 65 | + self._get_e2e_device_keys_and_signatures_txn, |
| 66 | + [(user_id, None)], |
| 67 | + ) |
73 | 68 |
|
74 | 69 | if devices: |
75 | 70 | user_devices = devices[user_id] |
|
0 commit comments