diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2022-05-27 17:47:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 17:47:32 +0200 |
commit | 28989cb301fecf5a669a634c09bc2b73f97fec5d (patch) | |
tree | 1233c0aed9e1b0b3c03be144ab39c323dae1759a /synapse/config | |
parent | Add code M_USER_ACCOUNT_SUSPENDED, as per MSC3823. (#12845) (diff) | |
download | synapse-28989cb301fecf5a669a634c09bc2b73f97fec5d.tar.xz |
Add a background job to automatically delete stale devices (#12855)
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/server.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index f73d5e1f66..657322cb1f 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -679,6 +679,17 @@ class ServerConfig(Config): config.get("exclude_rooms_from_sync") or [] ) + delete_stale_devices_after: Optional[str] = ( + config.get("delete_stale_devices_after") or None + ) + + if delete_stale_devices_after is not None: + self.delete_stale_devices_after: Optional[int] = self.parse_duration( + delete_stale_devices_after + ) + else: + self.delete_stale_devices_after = None + def has_tls_listener(self) -> bool: return any(listener.tls for listener in self.listeners) |