diff options
author | Erik Johnston <erik@matrix.org> | 2020-08-25 15:10:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-25 15:10:08 +0100 |
commit | 2231dffee6788836c86e868dd29574970b13dd18 (patch) | |
tree | 0e558b50207e5b85d00e0f1eb3d90a954dd0b04c /synapse/storage/databases/main/receipts.py | |
parent | Wording fixes to 'name' user admin api filter (#8163) (diff) | |
download | synapse-2231dffee6788836c86e868dd29574970b13dd18.tar.xz |
Make StreamIdGen `get_next` and `get_next_mult` async (#8161)
This is mainly so that `StreamIdGenerator` and `MultiWriterIdGenerator` will have the same interface, allowing them to be used interchangeably.
Diffstat (limited to 'synapse/storage/databases/main/receipts.py')
-rw-r--r-- | synapse/storage/databases/main/receipts.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index 19ad1c056f..6821476ee0 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -520,8 +520,7 @@ class ReceiptsStore(ReceiptsWorkerStore): "insert_receipt_conv", graph_to_linear ) - stream_id_manager = self._receipts_id_gen.get_next() - with stream_id_manager as stream_id: + with await self._receipts_id_gen.get_next() as stream_id: event_ts = await self.db_pool.runInteraction( "insert_linearized_receipt", self.insert_linearized_receipt_txn, |