summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-09-28 09:24:40 -0400
committerGitHub <noreply@github.com>2021-09-28 09:24:40 -0400
commiteb2c7e51c460a83b7880eefc66eb9ca6a8adab94 (patch)
tree6e38392e78fa67e2faf9b712a7599ba8a3e911f7 /synapse/handlers
parentOnly do restricted join rules signature checks for room versions 8/9. (#10927) (diff)
downloadsynapse-eb2c7e51c460a83b7880eefc66eb9ca6a8adab94.tar.xz
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.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/pagination.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index 08b93b3ec1..a5301ece6f 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -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(