mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:34:56 -04:00
Clean-up type hints in server config (#10915)
By using attrs instead of dicts to store configuration. Also updates some of the attrs classes to use proper type hints and auto_attribs.
This commit is contained in:
parent
c3ccad7785
commit
eb2c7e51c4
3 changed files with 54 additions and 55 deletions
|
@ -92,16 +92,16 @@ class PaginationHandler:
|
|||
|
||||
if hs.config.worker.run_background_tasks and hs.config.retention_enabled:
|
||||
# Run the purge jobs described in the configuration file.
|
||||
for job in hs.config.retention_purge_jobs:
|
||||
for job in hs.config.server.retention_purge_jobs:
|
||||
logger.info("Setting up purge job with config: %s", job)
|
||||
|
||||
self.clock.looping_call(
|
||||
run_as_background_process,
|
||||
job["interval"],
|
||||
job.interval,
|
||||
"purge_history_for_rooms_in_range",
|
||||
self.purge_history_for_rooms_in_range,
|
||||
job["shortest_max_lifetime"],
|
||||
job["longest_max_lifetime"],
|
||||
job.shortest_max_lifetime,
|
||||
job.longest_max_lifetime,
|
||||
)
|
||||
|
||||
async def purge_history_for_rooms_in_range(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue