summary refs log tree commit diff
path: root/synapse/storage/transactions.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-05 18:21:19 +0100
committerErik Johnston <erik@matrix.org>2015-05-05 18:21:19 +0100
commit0c4ac271ca2c9e46e20ba9546f0e6f1983d8e923 (patch)
treeaa5af8e6167cffa28a30d5eb329db1203678103c /synapse/storage/transactions.py
parentDon't insert without deduplication. In this case we never actually use this t... (diff)
parentAnd use buffer(...) there as well (diff)
downloadsynapse-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.py6
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,