Software /
code /
prosody
Comparison
plugins/mod_muc_mam.lua @ 10561:29b3eb95c268 0.11
mod_muc_mam: Log error when unable to delete old messages (fix #1481) [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 24 Dec 2019 00:26:37 +0100 |
parent | 10526:28c8e09fb3cd |
child | 10562:670afc079f68 |
comparison
equal
deleted
inserted
replaced
10526:28c8e09fb3cd | 10561:29b3eb95c268 |
---|---|
457 for room in pairs(rooms) do | 457 for room in pairs(rooms) do |
458 local ok, err = archive:delete(room, { ["end"] = os.time() - cleanup_after; }) | 458 local ok, err = archive:delete(room, { ["end"] = os.time() - cleanup_after; }) |
459 if ok then | 459 if ok then |
460 num_rooms = num_rooms + 1; | 460 num_rooms = num_rooms + 1; |
461 sum = sum + (tonumber(ok) or 0); | 461 sum = sum + (tonumber(ok) or 0); |
462 else | |
463 module:log("error", "Could not delete messages for room '%s': %s", room, err); | |
462 end | 464 end |
463 end | 465 end |
464 module:log("info", "Deleted %d expired messages for %d rooms", sum, num_rooms); | 466 module:log("info", "Deleted %d expired messages for %d rooms", sum, num_rooms); |
465 end); | 467 end); |
466 | 468 |