fix race condiftion in calling initialise_reserved_users

This commit is contained in:
Neil Johnson 2018-10-23 15:24:58 +01:00
parent 7aea00069c
commit 6105c6101f
5 changed files with 55 additions and 27 deletions

View file

@ -553,14 +553,6 @@ def run(hs):
generate_monthly_active_users,
)
# XXX is this really supposed to be a background process? it looks
# like it needs to complete before some of the other stuff runs.
run_as_background_process(
"initialise_reserved_users",
hs.get_datastore().initialise_reserved_users,
hs.config.mau_limits_reserved_threepids,
)
start_generate_monthly_active_users()
if hs.config.limit_usage_by_mau:
clock.looping_call(start_generate_monthly_active_users, 5 * 60 * 1000)