From 0e6f700a1361e1511c6f3fc3973a83ba8b2040da Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Tue, 13 Aug 2019 15:49:24 +0100 Subject: Remove clean-up handler and replace with no-op as not currently needed. needed. Signed-off-by: Olivier Wilkinson (reivilibre) --- synapse/storage/stats.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py index 73b624e9f4..4c3db891c8 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py @@ -73,8 +73,11 @@ class StatsStore(StateDeltasStore): self.register_background_update_handler( "populate_stats_process_users", self._populate_stats_process_users ) - self.register_background_update_handler( - "populate_stats_cleanup", self._populate_stats_cleanup + # 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.register_noop_background_update( + "populate_stats_cleanup" ) def quantise_stats_time(self, ts): @@ -217,17 +220,6 @@ class StatsStore(StateDeltasStore): yield self._end_background_update("populate_stats_prepare") defer.returnValue(1) - @defer.inlineCallbacks - def _populate_stats_cleanup(self, progress, batch_size): - """ - This is a background update which cleans up after statistics regeneration. - """ - # TODO is there really no clean-up to be done? - - # TODO if not self.stats_enabled … cleanup. - yield self._end_background_update("populate_stats_cleanup") - defer.returnValue(1) - @defer.inlineCallbacks def _populate_stats_process_users(self, progress, batch_size): """ -- cgit 1.4.1