mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 00:59:12 -04:00
Use direct references for configuration variables (part 6). (#10916)
This commit is contained in:
parent
8cef1ab2ac
commit
94b620a5ed
54 changed files with 141 additions and 132 deletions
|
@ -36,7 +36,7 @@ class CensorEventsStore(EventsWorkerStore, CacheInvalidationWorkerStore, SQLBase
|
|||
|
||||
if (
|
||||
hs.config.worker.run_background_tasks
|
||||
and self.hs.config.redaction_retention_period is not None
|
||||
and self.hs.config.server.redaction_retention_period is not None
|
||||
):
|
||||
hs.get_clock().looping_call(self._censor_redactions, 5 * 60 * 1000)
|
||||
|
||||
|
@ -48,7 +48,7 @@ class CensorEventsStore(EventsWorkerStore, CacheInvalidationWorkerStore, SQLBase
|
|||
By censor we mean update the event_json table with the redacted event.
|
||||
"""
|
||||
|
||||
if self.hs.config.redaction_retention_period is None:
|
||||
if self.hs.config.server.redaction_retention_period is None:
|
||||
return
|
||||
|
||||
if not (
|
||||
|
@ -60,7 +60,9 @@ class CensorEventsStore(EventsWorkerStore, CacheInvalidationWorkerStore, SQLBase
|
|||
# created.
|
||||
return
|
||||
|
||||
before_ts = self._clock.time_msec() - self.hs.config.redaction_retention_period
|
||||
before_ts = (
|
||||
self._clock.time_msec() - self.hs.config.server.redaction_retention_period
|
||||
)
|
||||
|
||||
# We fetch all redactions that:
|
||||
# 1. point to an event we have,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue