Replace noop background updates with DELETE. (#12954)

Removes the `register_noop_background_update` and deletes the background
updates directly in a delta file.
This commit is contained in:
Patrick Cloke 2022-06-13 14:06:27 -04:00 committed by GitHub
parent f68b5e5773
commit 53b77b203a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 62 additions and 146 deletions

View file

@ -120,11 +120,6 @@ class StatsStore(StateDeltasStore):
self.db_pool.updates.register_background_update_handler(
"populate_stats_process_users", self._populate_stats_process_users
)
# we no longer need to perform clean-up, but we will give ourselves
# the potential to reintroduce it in the future so documentation
# will still encourage the use of this no-op handler.
self.db_pool.updates.register_noop_background_update("populate_stats_cleanup")
self.db_pool.updates.register_noop_background_update("populate_stats_prepare")
async def _populate_stats_process_users(
self, progress: JsonDict, batch_size: int