From 094b11edc72ae956db183203f3f4a4d1d8c6e0b5 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 22 Sep 2020 13:27:38 -0400 Subject: [PATCH] Only run function on background worker. --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 9ef438bec5..5c7498ad1a 100644 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -657,10 +657,10 @@ def run(hs): "generate_monthly_active_users", generate_monthly_active_users ) - start_generate_monthly_active_users() if hs.config.run_background_tasks and ( hs.config.limit_usage_by_mau or hs.config.mau_stats_only ): + start_generate_monthly_active_users() clock.looping_call(start_generate_monthly_active_users, 5 * 60 * 1000) # End of monthly active user settings