Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Neilj/fix mau initial reserved users (#4211)
Browse files Browse the repository at this point in the history
* fix transaction wrapping bug that caused get_user_id_by_threepid_txn to fail

* towncrier

* white space
  • Loading branch information
neilisfragile authored and hawkowl committed Nov 28, 2018
1 parent 944d524 commit f9b136a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelog.d/4211.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix start up failure when mau_limit_reserved_threepids set and db is postgres

5 changes: 3 additions & 2 deletions synapse/storage/monthly_active_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def __init__(self, dbconn, hs):
self.hs = hs
self.reserved_users = ()
# Do not add more reserved users than the total allowable number
self._initialise_reserved_users(
dbconn.cursor(),
self._new_transaction(
dbconn, "initialise_mau_threepids", [], [],
self._initialise_reserved_users,
hs.config.mau_limits_reserved_threepids[:self.hs.config.max_mau_value],
)

Expand Down

0 comments on commit f9b136a

Please sign in to comment.