Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Implement username availability checker #2183
Conversation
lukebarnard1
assigned
erikjohnston
May 3, 2017
| + 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 |
lukebarnard1
May 3, 2017
•
Contributor
Er, the docs say,
sleep_limit (int): The number of requests received...
| + 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 |
|
lukebarnard1 commentedMay 3, 2017
•
edited
Outlined here: vector-im/riot-web#3605 (comment)
UPDATE: This API should have always been a
POSTAPI, I've updated the below to reflect that. (#2209)ANOTHER UPDATE: @richvdh thinks (and I agree) that this should've been a
GETwith a query parameter all along! - #2213.If available, the response looks like
Otherwise,
or
or