mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-14 13:40:39 +00:00
start_doing_background_updates once and for all databases
The code has evolved since I first put this PR up, see https://github.com/element-hq/synapse/pull/19181
This commit is contained in:
@@ -449,10 +449,6 @@ async def start(
|
||||
|
||||
await _base.start(hs, freeze=freeze)
|
||||
|
||||
# TODO: Feels like this should be moved somewhere else.
|
||||
for db in hs.get_datastores().databases:
|
||||
db.updates.start_doing_background_updates()
|
||||
|
||||
|
||||
def start_reactor(
|
||||
config: HomeServerConfig,
|
||||
|
||||
+2
-1
@@ -670,7 +670,8 @@ class HomeServer(metaclass=abc.ABCMeta):
|
||||
self.get_task_scheduler()
|
||||
self.get_common_usage_metrics_manager().setup()
|
||||
start_phone_stats_home(self)
|
||||
self.get_datastores().main.db_pool.updates.start_doing_background_updates()
|
||||
for db in self.get_datastores().databases:
|
||||
db.updates.start_doing_background_updates()
|
||||
|
||||
def get_reactor(self) -> ISynapseReactor:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user