mirror of
https://github.com/element-hq/synapse
synced 2024-09-12 03:35:10 +00:00
update generate_monthly_active_users, and reap_monthly_active_users
This commit is contained in:
parent
5e2f7b8084
commit
c0affa7b4f
1 changed files with 2 additions and 2 deletions
|
@ -520,14 +520,14 @@ def run(hs):
|
||||||
# table will decrease
|
# table will decrease
|
||||||
clock.looping_call(generate_user_daily_visit_stats, 5 * 60 * 1000)
|
clock.looping_call(generate_user_daily_visit_stats, 5 * 60 * 1000)
|
||||||
clock.looping_call(
|
clock.looping_call(
|
||||||
MonthlyActiveUsersStore(hs).reap_monthly_active_users, 1000 * 60 * 60
|
hs.get_datastore().reap_monthly_active_users, 1000 * 60 * 60
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def generate_monthly_active_users():
|
def generate_monthly_active_users():
|
||||||
count = 0
|
count = 0
|
||||||
if hs.config.limit_usage_by_mau:
|
if hs.config.limit_usage_by_mau:
|
||||||
count = yield hs.get_datastore().count_monthly_users()
|
count = yield hs.get_datastore().get_monthly_active_count()
|
||||||
current_mau_gauge.set(float(count))
|
current_mau_gauge.set(float(count))
|
||||||
max_mau_value_gauge.set(float(hs.config.max_mau_value))
|
max_mau_value_gauge.set(float(hs.config.max_mau_value))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue