mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-21 02:14:08 -04:00
Use direct references for some configuration variables (#10798)
Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
This commit is contained in:
parent
9f111075e8
commit
01c88a09cd
66 changed files with 152 additions and 133 deletions
|
@ -45,16 +45,16 @@ class BaseHandler:
|
|||
self.request_ratelimiter = Ratelimiter(
|
||||
store=self.store, clock=self.clock, rate_hz=0, burst_count=0
|
||||
)
|
||||
self._rc_message = self.hs.config.rc_message
|
||||
self._rc_message = self.hs.config.ratelimiting.rc_message
|
||||
|
||||
# Check whether ratelimiting room admin message redaction is enabled
|
||||
# by the presence of rate limits in the config
|
||||
if self.hs.config.rc_admin_redaction:
|
||||
if self.hs.config.ratelimiting.rc_admin_redaction:
|
||||
self.admin_redaction_ratelimiter: Optional[Ratelimiter] = Ratelimiter(
|
||||
store=self.store,
|
||||
clock=self.clock,
|
||||
rate_hz=self.hs.config.rc_admin_redaction.per_second,
|
||||
burst_count=self.hs.config.rc_admin_redaction.burst_count,
|
||||
rate_hz=self.hs.config.ratelimiting.rc_admin_redaction.per_second,
|
||||
burst_count=self.hs.config.ratelimiting.rc_admin_redaction.burst_count,
|
||||
)
|
||||
else:
|
||||
self.admin_redaction_ratelimiter = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue