diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-09 11:32:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 11:32:44 +0000 |
commit | a9b393340fb9e4bf227f5ef0ca3de708748a617c (patch) | |
tree | b80d67d8eaf89bb1e993cf159643229b4672541a /synapse/storage/data_stores | |
parent | Merge pull request #6469 from matrix-org/erikj/make_database_class (diff) | |
parent | Fixup functions to consistently return deferreds (diff) | |
download | synapse-a9b393340fb9e4bf227f5ef0ca3de708748a617c.tar.xz |
Merge pull request #6484 from matrix-org/erikj/port_sync_handler
Port SyncHandler to async/await
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r-- | synapse/storage/data_stores/main/account_data.py | 2 | ||||
-rw-r--r-- | synapse/storage/data_stores/main/group_server.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/data_stores/main/account_data.py b/synapse/storage/data_stores/main/account_data.py index a96fe9485c..1a3dd7be8d 100644 --- a/synapse/storage/data_stores/main/account_data.py +++ b/synapse/storage/data_stores/main/account_data.py @@ -250,7 +250,7 @@ class AccountDataWorkerStore(SQLBaseStore): user_id, int(stream_id) ) if not changed: - return {}, {} + return defer.succeed(({}, {})) return self.db.runInteraction( "get_updated_account_data_for_user", get_updated_account_data_for_user_txn diff --git a/synapse/storage/data_stores/main/group_server.py b/synapse/storage/data_stores/main/group_server.py index 7f5e8dce66..6acd45e9f3 100644 --- a/synapse/storage/data_stores/main/group_server.py +++ b/synapse/storage/data_stores/main/group_server.py @@ -1111,7 +1111,7 @@ class GroupServerStore(SQLBaseStore): user_id, from_token ) if not has_changed: - return [] + return defer.succeed([]) def _get_groups_changes_for_user_txn(txn): sql = """ @@ -1141,7 +1141,7 @@ class GroupServerStore(SQLBaseStore): from_token ) if not has_changed: - return [] + return defer.succeed([]) def _get_all_groups_changes_txn(txn): sql = """ |