aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_errors.lua25
-rw-r--r--plugins/mod_mam/mod_mam.lua11
-rw-r--r--plugins/mod_posix.lua2
3 files changed, 24 insertions, 14 deletions
diff --git a/plugins/mod_http_errors.lua b/plugins/mod_http_errors.lua
index 13473219..2bb13298 100644
--- a/plugins/mod_http_errors.lua
+++ b/plugins/mod_http_errors.lua
@@ -26,21 +26,24 @@ local html = [[
<meta charset="utf-8">
<title>{title}</title>
<style>
-body{
- margin-top:14%;
- text-align:center;
- background-color:#F8F8F8;
- font-family:sans-serif;
+body {
+ margin-top : 14%;
+ text-align : center;
+ background-color : #F8F8F8;
+ font-family : sans-serif
}
-h1{
- font-size:xx-large;
+
+h1 {
+ font-size : xx-large
}
-p{
- font-size:x-large;
+
+p {
+ font-size : x-large
}
+
p+p {
- font-size:large;
- font-family:courier;
+ font-size : large;
+ font-family : courier
}
</style>
</head>
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 35a4b9a0..d2ca709b 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -351,19 +351,25 @@ if cleanup_after ~= "never" then
function schedule_cleanup(username, date)
cleanup_map:set(date or datestamp(), username, true);
end
+ local cleanup_time = module:measure("cleanup", "times");
cleanup_runner = require "util.async".runner(function ()
+ local cleanup_done = cleanup_time();
local users = {};
local cut_off = datestamp(os.time() - cleanup_after);
for date in cleanup_storage:users() do
- if date < cut_off then
+ if date <= cut_off then
module:log("debug", "Messages from %q should be expired", date);
local messages_this_day = cleanup_storage:get(date);
if messages_this_day then
for user in pairs(messages_this_day) do
users[user] = true;
end
- cleanup_storage:set(date, nil);
+ if date < cut_off then
+ -- Messages from the same day as the cut-off might not have expired yet,
+ -- but all earlier will have, so clear storage for those days.
+ cleanup_storage:set(date, nil);
+ end
end
end
end
@@ -376,6 +382,7 @@ if cleanup_after ~= "never" then
end
end
module:log("info", "Deleted %d expired messages for %d users", sum, num_users);
+ cleanup_done();
end);
cleanup_task = module:add_timer(1, function ()
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua
index 825d3be0..23df4d23 100644
--- a/plugins/mod_posix.lua
+++ b/plugins/mod_posix.lua
@@ -172,7 +172,7 @@ if have_signal then
signal.signal("SIGHUP", function ()
module:log("info", "Received SIGHUP");
prosody.reload_config();
- prosody.reopen_logfiles();
+ -- this also reloads logging
end);
signal.signal("SIGINT", function ()