diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-01 16:17:42 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-01 16:17:42 +0100 |
commit | b7f203a56658bdd6d7bf39e82fc1ffd0dae1f61a (patch) | |
tree | 1fef58c5350799d5e48c873e5b2ac52e9d4cb99a | |
parent | improve clarity (diff) | |
download | synapse-b7f203a56658bdd6d7bf39e82fc1ffd0dae1f61a.tar.xz |
count_monthly_users is now async
Diffstat (limited to '')
-rwxr-xr-x | synapse/app/homeserver.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 46325d8521..fba51c26e8 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -519,10 +519,11 @@ def run(hs): # table will decrease clock.looping_call(generate_user_daily_visit_stats, 5 * 60 * 1000) + @defer.inlineCallbacks def generate_monthly_active_users(): count = 0 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)) max_mau_value_gauge.set(float(hs.config.max_mau_value)) |