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
This commit is contained in:
Mark Haines 2016-04-08 14:01:56 +01:00
parent d63b49137a
commit 7e2f971c08
15 changed files with 4 additions and 485 deletions

View file

@ -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