diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_muc_mam.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua index fee75e33..e7506bbb 100644 --- a/plugins/mod_muc_mam.lua +++ b/plugins/mod_muc_mam.lua @@ -481,7 +481,10 @@ if cleanup_after ~= "never" then end end + local cleanup_time = module:measure("cleanup", "times"); + cleanup_runner = require "util.async".runner(function () + local cleanup_done = cleanup_time(); local rooms = {}; local cut_off = datestamp(os.time() - cleanup_after); for date in cleanup_storage:users() do @@ -512,6 +515,7 @@ if cleanup_after ~= "never" then end end module:log("info", "Deleted %d expired messages for %d rooms", sum, num_rooms); + cleanup_done(); end); cleanup_task = module:add_timer(1, function () |