summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-18 16:48:37 +0000
committerErik Johnston <erik@matrix.org>2016-01-18 16:49:46 +0000
commit5cd2126a6a6e23ec1f694cfba7be7bbf29bd1506 (patch)
treedb8a6db5d524352bc7b85a9b9e5ee52756233cfe
parentDon't split at word boundaries, actually use regex (diff)
downloadsynapse-5cd2126a6a6e23ec1f694cfba7be7bbf29bd1506.tar.xz
Remove dead code
-rw-r--r--synapse/storage/push_rule.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index f210e6c14d..2adfefd994 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 from ._base import SQLBaseStore
-from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
+from synapse.util.caches.descriptors import cachedInlineCallbacks
 from twisted.internet import defer
 
 import logging
@@ -60,27 +60,6 @@ class PushRuleStore(SQLBaseStore):
             r['rule_id']: False if r['enabled'] == 0 else True for r in results
         })
 
-    @cached()
-    def _get_push_rules_enabled_for_user(self, user_id):
-        def f(txn):
-            sql = (
-                "SELECT pr.*"
-                " FROM push_rules AS pr"
-                " LEFT JOIN push_rules_enable AS pre"
-                " ON pr.user_name = pre.user_name AND pr.rule_id = pre.rule_id"
-                " WHERE pr.user_name = ?"
-                " AND (pre.enabled IS NULL OR pre.enabled = 1)"
-                " ORDER BY pr.priority_class DESC, pr.priority DESC"
-            )
-            txn.execute(sql, (user_id,))
-            return self.cursor_to_dict(txn)
-
-        return self.runInteraction(
-            "_get_push_rules_enabled_for_user", f
-        )
-
-    # @cachedList(cache=_get_push_rules_enabled_for_user.cache, list_name="user_ids",
-    #             num_args=1, inlineCallbacks=True)
     @defer.inlineCallbacks
     def bulk_get_push_rules(self, user_ids):
         if not user_ids: