diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-20 16:23:01 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-20 16:23:01 +0000 |
commit | 4848fdbf59b7e4c28baf86179cfd753e433f4d3f (patch) | |
tree | 91c2bd508fde6087bad90ce3c79be3f20b40d21e /synapse/storage/push_rule.py | |
parent | Add the tiniest of tiny one-element caches to get_room_events_max_id() as it'... (diff) | |
parent | PEP8 (diff) | |
download | synapse-4848fdbf59b7e4c28baf86179cfd753e433f4d3f.tar.xz |
Merge pull request #113 from matrix-org/store_rearrangement
Store rearrangement
Diffstat (limited to 'synapse/storage/push_rule.py')
-rw-r--r-- | synapse/storage/push_rule.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py index d769db2c78..c47bdc2861 100644 --- a/synapse/storage/push_rule.py +++ b/synapse/storage/push_rule.py @@ -50,7 +50,8 @@ class PushRuleStore(SQLBaseStore): results = yield self._simple_select_list( PushRuleEnableTable.table_name, {'user_name': user_name}, - PushRuleEnableTable.fields + PushRuleEnableTable.fields, + desc="get_push_rules_enabled_for_user", ) defer.returnValue( {r['rule_id']: False if r['enabled'] == 0 else True for r in results} @@ -201,7 +202,8 @@ class PushRuleStore(SQLBaseStore): """ yield self._simple_delete_one( PushRuleTable.table_name, - {'user_name': user_name, 'rule_id': rule_id} + {'user_name': user_name, 'rule_id': rule_id}, + desc="delete_push_rule", ) @defer.inlineCallbacks @@ -209,7 +211,8 @@ class PushRuleStore(SQLBaseStore): yield self._simple_upsert( PushRuleEnableTable.table_name, {'user_name': user_name, 'rule_id': rule_id}, - {'enabled': enabled} + {'enabled': enabled}, + desc="set_push_rule_enabled", ) |