Improvements to the Limiter

* give them names, to improve logging
* use a deque rather than a list for efficiency
This commit is contained in:
Richard van der Hoff 2018-07-20 12:43:23 +01:00
parent d7275eecf3
commit 8462c26485
2 changed files with 21 additions and 14 deletions

View file

@ -427,7 +427,7 @@ class EventCreationHandler(object):
# We arbitrarily limit concurrent event creation for a room to 5.
# This is to stop us from diverging history *too* much.
self.limiter = Limiter(max_count=5)
self.limiter = Limiter(max_count=5, name="room_event_creation_limit")
self.action_generator = hs.get_action_generator()