mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-10 15:44:56 -04:00
Rename RateLimitConfig
to RatelimitSettings
(#13442)
This commit is contained in:
parent
570bf32bbb
commit
d6e94ad9d9
5 changed files with 30 additions and 29 deletions
|
@ -21,7 +21,7 @@ from typing import Any, DefaultDict, Iterator, List, Set
|
|||
from twisted.internet import defer
|
||||
|
||||
from synapse.api.errors import LimitExceededError
|
||||
from synapse.config.ratelimiting import FederationRateLimitConfig
|
||||
from synapse.config.ratelimiting import FederationRatelimitSettings
|
||||
from synapse.logging.context import (
|
||||
PreserveLoggingContext,
|
||||
make_deferred_yieldable,
|
||||
|
@ -36,7 +36,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
class FederationRateLimiter:
|
||||
def __init__(self, clock: Clock, config: FederationRateLimitConfig):
|
||||
def __init__(self, clock: Clock, config: FederationRatelimitSettings):
|
||||
def new_limiter() -> "_PerHostRatelimiter":
|
||||
return _PerHostRatelimiter(clock=clock, config=config)
|
||||
|
||||
|
@ -63,7 +63,7 @@ class FederationRateLimiter:
|
|||
|
||||
|
||||
class _PerHostRatelimiter:
|
||||
def __init__(self, clock: Clock, config: FederationRateLimitConfig):
|
||||
def __init__(self, clock: Clock, config: FederationRatelimitSettings):
|
||||
"""
|
||||
Args:
|
||||
clock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue