From 717fca45b4add443581a36bb2a227a23b5ace40a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 6 Aug 2021 15:45:15 +0100 Subject: Add store_server_keys_json_multi --- synapse/crypto/keyring.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'synapse/crypto/keyring.py') diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 9e9b1c1c86..4a34b798a5 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -544,22 +544,18 @@ class BaseV2KeyFetcher(KeyFetcher): key_json_bytes = encode_canonical_json(response_json) - await make_deferred_yieldable( - defer.gatherResults( - [ - run_in_background( - self.store.store_server_keys_json, - server_name=server_name, - key_id=key_id, - from_server=from_server, - ts_now_ms=time_added_ms, - ts_expires_ms=ts_valid_until_ms, - key_json_bytes=key_json_bytes, - ) - for key_id in verify_keys - ], - consumeErrors=True, - ).addErrback(unwrapFirstError) + await self.store.store_server_keys_json_multi( + [ + ( + server_name, + key_id, + from_server, + time_added_ms, + ts_valid_until_ms, + key_json_bytes, + ) + for key_id in verify_keys + ], ) return verify_keys -- cgit 1.5.1