mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-10-11 12:18:25 -04:00
Move background update handling out of store
This commit is contained in:
parent
8863624f78
commit
4a33a6dd19
27 changed files with 281 additions and 200 deletions
|
@ -47,9 +47,9 @@ async def make_homeserver(reactor, config=None):
|
|||
stor = hs.get_datastore()
|
||||
|
||||
# Run the database background updates.
|
||||
if hasattr(stor, "do_next_background_update"):
|
||||
while not await stor.has_completed_background_updates():
|
||||
await stor.do_next_background_update(1)
|
||||
if hasattr(stor.db.updates, "do_next_background_update"):
|
||||
while not await stor.db.updates.has_completed_background_updates():
|
||||
await stor.db.updates.do_next_background_update(1)
|
||||
|
||||
def cleanup():
|
||||
for i in cleanup_tasks:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue