summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-13 15:49:24 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-13 15:49:24 +0100
commit0e6f700a1361e1511c6f3fc3973a83ba8b2040da (patch)
treedafb7de300c40b1ba3ad8ea2e0d4e0eaff3336f1
parentRemove obsolete function (diff)
downloadsynapse-0e6f700a1361e1511c6f3fc3973a83ba8b2040da.tar.xz
Remove clean-up handler and replace with no-op as not currently needed.
needed.

Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
-rw-r--r--synapse/storage/stats.py18
1 files 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):
@@ -218,17 +221,6 @@ class StatsStore(StateDeltasStore):
         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):
         """
         This is a background update which regenerates statistics for users.