diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-14 14:32:18 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-14 14:32:18 +0100 |
commit | e25d87d97bb88cb2583f0419fce34b5d5907b76e (patch) | |
tree | f160d7a2ef17dfd398d3be9883985cb371eb61be /synapse/storage | |
parent | Dockerised sytest (#3660) (diff) | |
parent | rename _user_last_seen_monthly_active (diff) | |
download | synapse-e25d87d97bb88cb2583f0419fce34b5d5907b76e.tar.xz |
Merge branch 'neilj/mau_sync_block' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/monthly_active_users.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/storage/monthly_active_users.py b/synapse/storage/monthly_active_users.py index 9a6e699386..7b36accdb6 100644 --- a/synapse/storage/monthly_active_users.py +++ b/synapse/storage/monthly_active_users.py @@ -125,7 +125,7 @@ class MonthlyActiveUsersStore(SQLBaseStore): # is racy. # Have resolved to invalidate the whole cache for now and do # something about it if and when the perf becomes significant - self._user_last_seen_monthly_active.invalidate_all() + self.user_last_seen_monthly_active.invalidate_all() self.get_monthly_active_count.invalidate_all() @cached(num_args=0) @@ -164,11 +164,11 @@ class MonthlyActiveUsersStore(SQLBaseStore): lock=False, ) if is_insert: - self._user_last_seen_monthly_active.invalidate((user_id,)) + self.user_last_seen_monthly_active.invalidate((user_id,)) self.get_monthly_active_count.invalidate(()) @cached(num_args=1) - def _user_last_seen_monthly_active(self, user_id): + def user_last_seen_monthly_active(self, user_id): """ Checks if a given user is part of the monthly active user group Arguments: @@ -185,7 +185,7 @@ class MonthlyActiveUsersStore(SQLBaseStore): }, retcol="timestamp", allow_none=True, - desc="_user_last_seen_monthly_active", + desc="user_last_seen_monthly_active", )) @defer.inlineCallbacks @@ -197,7 +197,7 @@ class MonthlyActiveUsersStore(SQLBaseStore): user_id(str): the user_id to query """ if self.hs.config.limit_usage_by_mau: - last_seen_timestamp = yield self._user_last_seen_monthly_active(user_id) + last_seen_timestamp = yield self.user_last_seen_monthly_active(user_id) now = self.hs.get_clock().time_msec() # We want to reduce to the total number of db writes, and are happy |