1 files changed, 12 insertions, 12 deletions
diff --git a/synapse/storage/databases/main/monthly_active_users.py b/synapse/storage/databases/main/monthly_active_users.py
index 8e948c5e8d..659ee13d71 100644
--- a/synapse/storage/databases/main/monthly_active_users.py
+++ b/synapse/storage/databases/main/monthly_active_users.py
@@ -304,9 +304,9 @@ class MonthlyActiveUsersWorkerStore(RegistrationWorkerStore):
txn:
threepids: List of threepid dicts to reserve
"""
- assert (
- self._update_on_this_worker
- ), "This worker is not designated to update MAUs"
+ assert self._update_on_this_worker, (
+ "This worker is not designated to update MAUs"
+ )
# XXX what is this function trying to achieve? It upserts into
# monthly_active_users for each *registered* reserved mau user, but why?
@@ -340,9 +340,9 @@ class MonthlyActiveUsersWorkerStore(RegistrationWorkerStore):
Args:
user_id: user to add/update
"""
- assert (
- self._update_on_this_worker
- ), "This worker is not designated to update MAUs"
+ assert self._update_on_this_worker, (
+ "This worker is not designated to update MAUs"
+ )
# Support user never to be included in MAU stats. Note I can't easily call this
# from upsert_monthly_active_user_txn because then I need a _txn form of
@@ -379,9 +379,9 @@ class MonthlyActiveUsersWorkerStore(RegistrationWorkerStore):
txn:
user_id: user to add/update
"""
- assert (
- self._update_on_this_worker
- ), "This worker is not designated to update MAUs"
+ assert self._update_on_this_worker, (
+ "This worker is not designated to update MAUs"
+ )
# Am consciously deciding to lock the table on the basis that is ought
# never be a big table and alternative approaches (batching multiple
@@ -409,9 +409,9 @@ class MonthlyActiveUsersWorkerStore(RegistrationWorkerStore):
Args:
user_id: the user_id to query
"""
- assert (
- self._update_on_this_worker
- ), "This worker is not designated to update MAUs"
+ assert self._update_on_this_worker, (
+ "This worker is not designated to update MAUs"
+ )
if self._limit_usage_by_mau or self._mau_stats_only:
# Trial users and guests should not be included as part of MAU group
|