mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 21:44:48 -04:00
Prune rows in user_ips older than configured period
Defaults to pruning everything older than 28d.
This commit is contained in:
parent
2135c198d1
commit
242017db8b
3 changed files with 73 additions and 8 deletions
|
@ -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", "")
|
||||
|
@ -735,6 +742,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.
|
||||
#
|
||||
#user_ips_max_age: 14d
|
||||
"""
|
||||
% locals()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue