mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 21:53:50 +01:00
count_monthly_users is now async
This commit is contained in:
parent
7ff44d9215
commit
b7f203a566
1 changed files with 2 additions and 1 deletions
|
@ -519,10 +519,11 @@ 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)
|
||||||
|
|
||||||
|
@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 = hs.get_datastore().count_monthly_users()
|
count = yield hs.get_datastore().count_monthly_users()
|
||||||
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