summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2019-10-11 09:38:26 +0100
committerGitHub <noreply@github.com>2019-10-11 09:38:26 +0100
commita0d0ba7862e38588aa0d0ac29a720fdf06f1ab8d (patch)
treeafe26c9fe9f8e7a54e7eed4e60be4ad117f0acec /synapse/app
parentMerge pull request #6156 from matrix-org/erikj/postgres_any (diff)
downloadsynapse-a0d0ba7862e38588aa0d0ac29a720fdf06f1ab8d.tar.xz
Fix MAU reaping where reserved users are specified. (#6168)
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/homeserver.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 774326dff9..eb54f56853 100644
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -605,13 +605,13 @@ def run(hs):
     @defer.inlineCallbacks
     def generate_monthly_active_users():
         current_mau_count = 0
-        reserved_count = 0
+        reserved_users = ()
         store = hs.get_datastore()
         if hs.config.limit_usage_by_mau or hs.config.mau_stats_only:
             current_mau_count = yield store.get_monthly_active_count()
-            reserved_count = yield store.get_registered_reserved_users_count()
+            reserved_users = yield store.get_registered_reserved_users()
         current_mau_gauge.set(float(current_mau_count))
-        registered_reserved_users_mau_gauge.set(float(reserved_count))
+        registered_reserved_users_mau_gauge.set(float(len(reserved_users)))
         max_mau_gauge.set(float(hs.config.max_mau_value))
 
     def start_generate_monthly_active_users():