0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-09-29 13:08:57 +02:00
This commit is contained in:
Neil Johnson 2018-08-08 13:33:16 +01:00
parent e54794f5b6
commit 312ae74746
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
# If MAU user count still exceeds the MAU threshold, then delete on # If MAU user count still exceeds the MAU threshold, then delete on
# a least recently active basis. # a least recently active basis.
# Note it is not possible to write this query using OFFSET due to # Note it is not possible to write this query using OFFSET due to
# incompatibilities in how sqlite an postgres support the feature. # incompatibilities in how sqlite and postgres support the feature.
# sqlite requires 'LIMIT -1 OFFSET ?', the LIMIT must be present # sqlite requires 'LIMIT -1 OFFSET ?', the LIMIT must be present
# While Postgres does not require 'LIMIT', but also does not support # 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 # negative LIMIT values. So there is no way to write it that both can
@ -78,7 +78,7 @@ class MonthlyActiveUsersStore(SQLBaseStore):
@cached(num_args=0) @cached(num_args=0)
def get_monthly_active_count(self): def get_monthly_active_count(self):
"""Generates current count of monthly active users.abs """Generates current count of monthly active users
Returns: Returns:
Defered[int]: Number of current monthly active users Defered[int]: Number of current monthly active users

View file

@ -18,7 +18,7 @@ CREATE TABLE monthly_active_users (
user_id TEXT NOT NULL, user_id TEXT NOT NULL,
-- Last time we saw the user. Not guaranteed to be accurate due to rate limiting -- Last time we saw the user. Not guaranteed to be accurate due to rate limiting
-- on updates, Granularity of updates governed by -- on updates, Granularity of updates governed by
-- syanpse.storage.monthly_active_users.LAST_SEEN_GRANULARITY -- synapse.storage.monthly_active_users.LAST_SEEN_GRANULARITY
-- Measured in ms since epoch. -- Measured in ms since epoch.
timestamp BIGINT NOT NULL timestamp BIGINT NOT NULL
); );