diff options
author | Erik Johnston <erik@matrix.org> | 2019-09-26 10:23:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-26 10:23:54 +0100 |
commit | d64b70ada299c58fa7d2b4ed8d83f03594cfd938 (patch) | |
tree | 71dd953794ce378ef0e911665e0c8f5f8b22b57e /synapse/config/server.py | |
parent | Merge pull request #6089 from matrix-org/erikj/cleanup_user_ips (diff) | |
parent | Update comments and docstring (diff) | |
download | synapse-d64b70ada299c58fa7d2b4ed8d83f03594cfd938.tar.xz |
Merge pull request #6098 from matrix-org/erikj/cleanup_user_ips_2
Prune old rows in user_ips tables.
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r-- | synapse/config/server.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index 3a7a49bc91..9d3f1b5bfc 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -172,6 +172,13 @@ class ServerConfig(Config): else: self.redaction_retention_period = None + # How long to keep entries in the `users_ips` table. + user_ips_max_age = config.get("user_ips_max_age", "28d") + if user_ips_max_age is not None: + self.user_ips_max_age = self.parse_duration(user_ips_max_age) + else: + self.user_ips_max_age = None + # Options to disable HS self.hs_disabled = config.get("hs_disabled", False) self.hs_disabled_message = config.get("hs_disabled_message", "") @@ -736,6 +743,12 @@ class ServerConfig(Config): # Defaults to `7d`. Set to `null` to disable. # redaction_retention_period: 7d + + # How long to track users' last seen time and IPs in the database. + # + # Defaults to `28d`. Set to `null` to disable clearing out of old rows. + # + #user_ips_max_age: 14d """ % locals() ) |