From 53b77b203ac12f20a6534393464588d5d49435f5 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 13 Jun 2022 14:06:27 -0400 Subject: Replace noop background updates with DELETE. (#12954) Removes the `register_noop_background_update` and deletes the background updates directly in a delta file. --- synapse/storage/background_updates.py | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'synapse/storage/background_updates.py') diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py index b1e5208c76..555b4e77d2 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py @@ -507,25 +507,6 @@ class BackgroundUpdater: update_handler ) - def register_noop_background_update(self, update_name: str) -> None: - """Register a noop handler for a background update. - - This is useful when we previously did a background update, but no - longer wish to do the update. In this case the background update should - be removed from the schema delta files, but there may still be some - users who have the background update queued, so this method should - also be called to clear the update. - - Args: - update_name: Name of update - """ - - async def noop_update(progress: JsonDict, batch_size: int) -> int: - await self._end_background_update(update_name) - return 1 - - self.register_background_update_handler(update_name, noop_update) - def register_background_index_update( self, update_name: str, -- cgit 1.4.1