diff options
author | Brad Murray <bradtgmurray@gmail.com> | 2022-08-26 03:38:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 08:38:10 +0100 |
commit | 967d7bad6c1ea97fb234c3e6d0cbc87b73bb7d0a (patch) | |
tree | ddf71b509989d7ed7369d701a75bde5bf44dd7aa /synapse/handlers/pagination.py | |
parent | Debian packaging: explicitly allocate a group for the system user (#13593) (diff) | |
download | synapse-967d7bad6c1ea97fb234c3e6d0cbc87b73bb7d0a.tar.xz |
Move the execution of the retention purge_jobs to the main worker (#13632)
Fixes #9927 Signed-off-by: Brad Murray brad@beeper.com
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/pagination.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py index 74e944bce7..a0c39778ab 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py @@ -159,11 +159,9 @@ class PaginationHandler: self._retention_allowed_lifetime_max = ( hs.config.retention.retention_allowed_lifetime_max ) + self._is_master = hs.config.worker.worker_app is None - if ( - hs.config.worker.run_background_tasks - and hs.config.retention.retention_enabled - ): + if hs.config.retention.retention_enabled and self._is_master: # Run the purge jobs described in the configuration file. for job in hs.config.retention.retention_purge_jobs: logger.info("Setting up purge job with config: %s", job) |