mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix setting mau_limit_reserved_threepids
config (#6793)
Calling the invalidation function during initialisation of the data stores introduces a circular dependency, causing Synapse to fail to start.
This commit is contained in:
parent
9bae740527
commit
bdbeeb94ec
1
changelog.d/6793.bugfix
Normal file
1
changelog.d/6793.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix bug where setting `mau_limit_reserved_threepids` config would cause Synapse to refuse to start.
|
@ -121,7 +121,13 @@ class MonthlyActiveUsersStore(MonthlyActiveUsersWorkerStore):
|
|||||||
if user_id:
|
if user_id:
|
||||||
is_support = self.is_support_user_txn(txn, user_id)
|
is_support = self.is_support_user_txn(txn, user_id)
|
||||||
if not is_support:
|
if not is_support:
|
||||||
self.upsert_monthly_active_user_txn(txn, user_id)
|
# We do this manually here to avoid hitting #6791
|
||||||
|
self.db.simple_upsert_txn(
|
||||||
|
txn,
|
||||||
|
table="monthly_active_users",
|
||||||
|
keyvalues={"user_id": user_id},
|
||||||
|
values={"timestamp": int(self._clock.time_msec())},
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
logger.warning("mau limit reserved threepid %s not found in db" % tp)
|
logger.warning("mau limit reserved threepid %s not found in db" % tp)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user