summary refs log tree commit diff
path: root/synapse/replication/slave
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-04-08 23:51:52 +0100
committerRichard van der Hoff <richard@matrix.org>2019-04-08 23:59:07 +0100
commitf50efcb65d794985185f5cc82c697673f50e4c47 (patch)
tree64c2cf87130581b15911b99d0ceaa56071263a31 /synapse/replication/slave
parentRemove redundant merged_keys dict (diff)
downloadsynapse-f50efcb65d794985185f5cc82c697673f50e4c47.tar.xz
Replace SlavedKeyStore with a shim
since we're pulling everything out of KeyStore anyway, we may as well simplify
it.
Diffstat (limited to 'synapse/replication/slave')
-rw-r--r--synapse/replication/slave/storage/keys.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/synapse/replication/slave/storage/keys.py b/synapse/replication/slave/storage/keys.py

index de00660c0e..cc6f7f009f 100644 --- a/synapse/replication/slave/storage/keys.py +++ b/synapse/replication/slave/storage/keys.py
@@ -13,19 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.storage import DataStore -from synapse.storage.keys import KeyStore +from synapse.storage import KeyStore -from ._base import BaseSlavedStore, __func__ +# KeyStore isn't really safe to use from a worker, but for now we do so and hope that +# the races it creates aren't too bad. - -class SlavedKeyStore(BaseSlavedStore): - _get_server_verify_key = KeyStore.__dict__[ - "_get_server_verify_key" - ] - - get_server_verify_keys = __func__(DataStore.get_server_verify_keys) - store_server_verify_key = __func__(DataStore.store_server_verify_key) - - get_server_keys_json = __func__(DataStore.get_server_keys_json) - store_server_keys_json = __func__(DataStore.store_server_keys_json) +SlavedKeyStore = KeyStore