summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-05-31 12:11:56 +0100
committerGitHub <noreply@github.com>2019-05-31 12:11:56 +0100
commit58cce39f3a91d81f3c994d510b0a283efd468ec7 (patch)
tree5d3edea845bd4347dd1c77684dbc1c9a8f0c30c0 /synapse/config
parentMerge pull request #5300 from matrix-org/rav/server_keys/06-fix-serverkeys-ha... (diff)
parentSample config (diff)
downloadsynapse-58cce39f3a91d81f3c994d510b0a283efd468ec7.tar.xz
Merge pull request #5276 from matrix-org/babolivier/account_validity_job_delta
Allow configuring a range for the account validity startup job
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/registration.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 693288f938..aad3400819 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -39,6 +39,8 @@ class AccountValidityConfig(Config):
             else:
                 self.renew_email_subject = "Renew your %(app)s account"
 
+            self.startup_job_max_delta = self.period * 10. / 100.
+
         if self.renew_by_email_enabled and "public_baseurl" not in synapse_config:
             raise ConfigError("Can't send renewal emails without 'public_baseurl'")
 
@@ -129,7 +131,9 @@ class RegistrationConfig(Config):
         # This means that, if a validity period is set, and Synapse is restarted (it will
         # then derive an expiration date from the current validity period), and some time
         # after that the validity period changes and Synapse is restarted, the users'
-        # expiration dates won't be updated unless their account is manually renewed.
+        # expiration dates won't be updated unless their account is manually renewed. This
+        # date will be randomly selected within a range [now + period - d ; now + period],
+        # where d is equal to 10%% of the validity period.
         #
         #account_validity:
         #  enabled: True