mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-17 17:30:01 -05:00
call reap on start up and fix under reaping bug
This commit is contained in:
parent
372bf073c1
commit
bcfeb44afe
4 changed files with 19 additions and 2 deletions
|
|
@ -96,7 +96,10 @@ class MonthlyActiveUsersStore(SQLBaseStore):
|
|||
# While Postgres does not require 'LIMIT', but also does not support
|
||||
# negative LIMIT values. So there is no way to write it that both can
|
||||
# support
|
||||
query_args = [self.hs.config.max_mau_value]
|
||||
safe_guard = self.hs.config.max_mau_value - len(self.reserved_users)
|
||||
# Must be greater than zero for postgres
|
||||
safe_guard = safe_guard if safe_guard > 0 else 0
|
||||
query_args = [safe_guard]
|
||||
|
||||
base_sql = """
|
||||
DELETE FROM monthly_active_users
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue