Move experimental & retention config out of the server module. (#11070)

This commit is contained in:
Patrick Cloke 2021-10-15 10:30:48 -04:00 committed by GitHub
parent 6a67f3786a
commit 5573133348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 290 additions and 255 deletions

View file

@ -679,8 +679,8 @@ class RoomWorkerStore(SQLBaseStore):
# policy.
if not ret:
return {
"min_lifetime": self.config.server.retention_default_min_lifetime,
"max_lifetime": self.config.server.retention_default_max_lifetime,
"min_lifetime": self.config.retention.retention_default_min_lifetime,
"max_lifetime": self.config.retention.retention_default_max_lifetime,
}
row = ret[0]
@ -690,10 +690,10 @@ class RoomWorkerStore(SQLBaseStore):
# The default values will be None if no default policy has been defined, or if one
# of the attributes is missing from the default policy.
if row["min_lifetime"] is None:
row["min_lifetime"] = self.config.server.retention_default_min_lifetime
row["min_lifetime"] = self.config.retention.retention_default_min_lifetime
if row["max_lifetime"] is None:
row["max_lifetime"] = self.config.server.retention_default_max_lifetime
row["max_lifetime"] = self.config.retention.retention_default_max_lifetime
return row