diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-05 18:21:19 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-05 18:21:19 +0100 |
commit | 0c4ac271ca2c9e46e20ba9546f0e6f1983d8e923 (patch) | |
tree | aa5af8e6167cffa28a30d5eb329db1203678103c /synapse/storage/transactions.py | |
parent | Don't insert without deduplication. In this case we never actually use this t... (diff) | |
parent | And use buffer(...) there as well (diff) | |
download | synapse-0c4ac271ca2c9e46e20ba9546f0e6f1983d8e923.tar.xz |
Merge branch 'erikj/executemany' of github.com:matrix-org/synapse into erikj/SYN-371
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r-- | synapse/storage/transactions.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py index 89dd7d8947..624da4a9dc 100644 --- a/synapse/storage/transactions.py +++ b/synapse/storage/transactions.py @@ -17,6 +17,7 @@ from ._base import SQLBaseStore, cached from collections import namedtuple +from syutil.jsonutil import encode_canonical_json import logging logger = logging.getLogger(__name__) @@ -82,7 +83,7 @@ class TransactionStore(SQLBaseStore): "transaction_id": transaction_id, "origin": origin, "response_code": code, - "response_json": response_dict, + "response_json": buffer(encode_canonical_json(response_dict)), }, or_ignore=True, desc="set_received_txn_response", @@ -161,7 +162,8 @@ class TransactionStore(SQLBaseStore): return self.runInteraction( "delivered_txn", self._delivered_txn, - transaction_id, destination, code, response_dict + transaction_id, destination, code, + buffer(encode_canonical_json(response_dict)), ) def _delivered_txn(self, txn, transaction_id, destination, |