summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorLuke Barnard <lukeb@openmarket.com>2017-05-03 18:05:49 +0100
committerLuke Barnard <lukeb@openmarket.com>2017-05-03 18:05:49 +0100
commit3669065466ea35d5337631a7a089c03a65e9ddb8 (patch)
treeefb92f802428691c21ef188bdf03670eab32bf51 /synapse/rest/client
parentImplement username availability checker (diff)
downloadsynapse-3669065466ea35d5337631a7a089c03a65e9ddb8.tar.xz
Appease the flake8 gods
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/register.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py
index 49fee04ec8..38a739f2f8 100644
--- a/synapse/rest/client/v2_alpha/register.py
+++ b/synapse/rest/client/v2_alpha/register.py
@@ -129,11 +129,16 @@ class UsernameAvailabilityRestServlet(RestServlet):
         self.registration_handler = hs.get_handlers().registration_handler
         self.ratelimiter = FederationRateLimiter(
             hs.get_clock(),
-            window_size=2000, # Time window of 2s
-            sleep_limit=1, # Artificially delay requests if rate > sleep_limit/window_size
-            sleep_msec=1000, # Amount of artificial delay to apply
-            reject_limit=1, # Error with 429 if more than reject_limit requests are queued
-            concurrent_requests=1, # Allow 1 request at a time
+            # Time window of 2s
+            window_size=2000,
+            # Artificially delay requests if rate > sleep_limit/window_size
+            sleep_limit=1,
+            # Amount of artificial delay to apply
+            sleep_msec=1000,
+            # Error with 429 if more than reject_limit requests are queued
+            reject_limit=1,
+            # Allow 1 request at a time
+            concurrent_requests=1,
         )
 
     @defer.inlineCallbacks