summary refs log tree commit diff
path: root/synapse/util/ratelimitutils.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-04-08 14:01:56 +0100
committerMark Haines <mjark@negativecurvature.net>2016-04-08 14:01:56 +0100
commit7e2f971c08250cf432d43dd6244faefb2074ff8c (patch)
treeaa3987ef26f11dc98651a28c587ecb63155e8156 /synapse/util/ratelimitutils.py
parentMerge pull request #710 from matrix-org/markjh/move_fire (diff)
downloadsynapse-7e2f971c08250cf432d43dd6244faefb2074ff8c.tar.xz
Remove some unused functions (#711)
* Remove some unused functions

* get_room_events_stream is only used in tests

* is_exclusive_room might actually be something we want
Diffstat (limited to 'synapse/util/ratelimitutils.py')
-rw-r--r--synapse/util/ratelimitutils.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/synapse/util/ratelimitutils.py b/synapse/util/ratelimitutils.py
index 4076eed269..1101881a2d 100644
--- a/synapse/util/ratelimitutils.py
+++ b/synapse/util/ratelimitutils.py
@@ -100,20 +100,6 @@ class _PerHostRatelimiter(object):
         self.current_processing = set()
         self.request_times = []
 
-    def is_empty(self):
-        time_now = self.clock.time_msec()
-        self.request_times[:] = [
-            r for r in self.request_times
-            if time_now - r < self.window_size
-        ]
-
-        return not (
-            self.ready_request_queue
-            or self.sleeping_requests
-            or self.current_processing
-            or self.request_times
-        )
-
     @contextlib.contextmanager
     def ratelimit(self):
         # `contextlib.contextmanager` takes a generator and turns it into a