Переглянути джерело

Move the execution of the retention purge_jobs to the main worker (#13632)

Fixes #9927

Signed-off-by: Brad Murray brad@beeper.com
tags/v1.67.0rc1
Brad Murray 1 рік тому
committed by GitHub
джерело
коміт
967d7bad6c
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: 4AEE18F83AFDEB23
2 змінених файлів з 3 додано та 4 видалено
  1. +1
    -0
      changelog.d/13632.bugfix
  2. +2
    -4
      synapse/handlers/pagination.py

+ 1
- 0
changelog.d/13632.bugfix Переглянути файл

@@ -0,0 +1 @@
Fix the running of MSC1763 retention purge_jobs in deployments with background jobs running on a worker by forcing them back onto the main worker. Contributed by Brad @ Beeper.

+ 2
- 4
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)


Завантаження…
Відмінити
Зберегти