diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-07 12:17:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 12:17:17 -0400 |
commit | f3fe6961b211d898aa347771df598c531fbca90c (patch) | |
tree | 2389d40f2742f84264b3688edff377774dbfc495 /synapse/storage/databases/main/signatures.py | |
parent | Clarify that undoing a shutdown might not be possible (#8010) (diff) | |
download | synapse-f3fe6961b211d898aa347771df598c531fbca90c.tar.xz |
Convert additional database stores to async/await (#8045)
Diffstat (limited to 'synapse/storage/databases/main/signatures.py')
-rw-r--r-- | synapse/storage/databases/main/signatures.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/signatures.py b/synapse/storage/databases/main/signatures.py index dae8e8bd29..be191dd870 100644 --- a/synapse/storage/databases/main/signatures.py +++ b/synapse/storage/databases/main/signatures.py @@ -15,8 +15,6 @@ from unpaddedbase64 import encode_base64 -from twisted.internet import defer - from synapse.storage._base import SQLBaseStore from synapse.util.caches.descriptors import cached, cachedList @@ -40,9 +38,8 @@ class SignatureWorkerStore(SQLBaseStore): return self.db_pool.runInteraction("get_event_reference_hashes", f) - @defer.inlineCallbacks - def add_event_hashes(self, event_ids): - hashes = yield self.get_event_reference_hashes(event_ids) + async def add_event_hashes(self, event_ids): + hashes = await self.get_event_reference_hashes(event_ids) hashes = { e_id: {k: encode_base64(v) for k, v in h.items() if k == "sha256"} for e_id, h in hashes.items() |