summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmber H. Brown <hawkowl@atleastfornow.net>2019-07-05 23:34:24 +1000
committerAmber H. Brown <hawkowl@atleastfornow.net>2019-07-05 23:34:24 +1000
commit3d89feb438d7754ba32ec48757814175a8fa9911 (patch)
tree77a2bd105da812b549d4dd7db116dcae6aaf0557
parentlinting (diff)
downloadsynapse-3d89feb438d7754ba32ec48757814175a8fa9911.tar.xz
linting
-rw-r--r--synapse/storage/events_worker.py25
-rw-r--r--tests/unittest.py1
2 files changed, 0 insertions, 26 deletions
diff --git a/synapse/storage/events_worker.py b/synapse/storage/events_worker.py
index 9d7027b943..5f493a666f 100644
--- a/synapse/storage/events_worker.py
+++ b/synapse/storage/events_worker.py
@@ -688,31 +688,6 @@ class EventsWorkerStore(SQLBaseStore):
             room_id,
         )
 
-    def _get_current_state_event_counts_txn(self, txn, room_id):
-        """
-        See get_current_state_event_counts.
-        """
-        sql = "SELECT COUNT(*) FROM current_state_events WHERE room_id=?"
-        txn.execute(sql, (room_id,))
-        row = txn.fetchone()
-        return row[0] if row else 0
-
-    def get_current_state_event_counts(self, room_id):
-        """
-        Gets the current number of state events in a room.
-
-        Args:
-            room_id (str)
-
-        Returns:
-            Deferred[int]
-        """
-        return self.runInteraction(
-            "get_current_state_event_counts",
-            self._get_current_state_event_counts_txn,
-            room_id,
-        )
-
     @defer.inlineCallbacks
     def get_room_complexity(self, room_id):
         """
diff --git a/tests/unittest.py b/tests/unittest.py
index 1815c22d27..e6f90077e9 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -24,7 +24,6 @@ from mock import Mock
 from canonicaljson import json
 
 import twisted
-import twisted.logger
 from twisted.internet.defer import Deferred, succeed
 from twisted.python.threadpool import ThreadPool
 from twisted.trial import unittest