|
@@ -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)
|