diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-07-20 13:53:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-20 13:53:03 +0100 |
commit | 4f67623674dc32bd02997419286afd2585a2fbf4 (patch) | |
tree | 1d067720f1bdf93edb5023999b70e3a5f939a5f5 /synapse/handlers/message.py | |
parent | Admin API for creating new users (#3415) (diff) | |
parent | changelogs (diff) | |
download | synapse-4f67623674dc32bd02997419286afd2585a2fbf4.tar.xz |
Merge pull request #3571 from matrix-org/rav/limiter_fixes
A set of improvements to the Limiter
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index a39b852ceb..abc07ea87c 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -33,7 +33,7 @@ from synapse.events.utils import serialize_event from synapse.events.validator import EventValidator from synapse.replication.http.send_event import send_event_to_master from synapse.types import RoomAlias, RoomStreamToken, UserID -from synapse.util.async import Limiter, ReadWriteLock +from synapse.util.async import Linearizer, ReadWriteLock from synapse.util.frozenutils import frozendict_json_encoder from synapse.util.logcontext import run_in_background from synapse.util.metrics import measure_func @@ -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 = Linearizer(max_count=5, name="room_event_creation_limit") self.action_generator = hs.get_action_generator() |