summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-09-03 09:15:52 +0100
committerMark Haines <mark.haines@matrix.org>2014-09-03 09:15:52 +0100
commit30ad0c567437d19ebb4b172c12a2e22f65d2dd9a (patch)
tree9961b92b2b0ea6084d0bdda11bf32cfde88fa833 /synapse/server.py
parenthowto: Link jsfiddles correctly. Hide ugly TODOs. (diff)
parentFix tests to support ratelimiting (diff)
downloadsynapse-30ad0c567437d19ebb4b172c12a2e22f65d2dd9a.tar.xz
Merge branch 'ratelimiting' into develop
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 3e72b2bcd5..35e311a47d 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -32,6 +32,7 @@ from synapse.util import Clock
 from synapse.util.distributor import Distributor
 from synapse.util.lockutils import LockManager
 from synapse.streams.events import EventSources
+from synapse.api.ratelimiting import Ratelimiter
 
 
 class BaseHomeServer(object):
@@ -73,6 +74,7 @@ class BaseHomeServer(object):
         'resource_for_web_client',
         'resource_for_content_repo',
         'event_sources',
+        'ratelimiter',
     ]
 
     def __init__(self, hostname, **kwargs):
@@ -190,6 +192,9 @@ class HomeServer(BaseHomeServer):
     def build_event_sources(self):
         return EventSources(self)
 
+    def build_ratelimiter(self):
+        return Ratelimiter()
+
     def register_servlets(self):
         """ Register all servlets associated with this HomeServer.
         """