Move additional tasks to the background worker (#8458)

This commit is contained in:
Patrick Cloke 2020-10-07 11:27:56 -04:00 committed by GitHub
parent 8dbf62fada
commit e4f72ddc44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 195 additions and 197 deletions

View file

@ -61,7 +61,10 @@ class RoomMemberWorkerStore(EventsWorkerStore):
self._check_safe_current_state_events_membership_updated_txn(txn)
txn.close()
if self.hs.config.metrics_flags.known_servers:
if (
self.hs.config.run_background_tasks
and self.hs.config.metrics_flags.known_servers
):
self._known_servers_count = 1
self.hs.get_clock().looping_call(
run_as_background_process,