From f0fc620d2ac2fdec1c3e78cbae8052fd91e21a07 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 3 May 2022 19:36:17 +0200 Subject: util.prosodyctl.check: turn: Report lack of TURN services as a problem #1749 Rationale: It seems unlikely that someone who has not configured any TURN service runs 'prosodyctl check turn' expecting this to be okay. --- util/prosodyctl/check.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index cdea04b9..e7e362e1 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -1277,6 +1277,7 @@ local function check(arg) local count = it.count(pairs(turn_services)); if count == 0 then print("Error: Unable to find any TURN services configured. Enable mod_turn_external!"); + ok = false; else print("Identified "..tostring(count).." TURN services."); print(""); -- cgit v1.2.3 From 38c67064b3d36738e5db241041612eaeed6e79b4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 5 May 2022 14:10:59 +0200 Subject: mod_cron: Fix recording last task run time #1751 The type checks, they do nothing! Observed: Tasks that were supposed to run weekly or daily were running each hour. --- plugins/mod_cron.lua | 1 + teal-src/plugins/mod_cron.tl | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua index f0c85615..33d97df6 100644 --- a/plugins/mod_cron.lua +++ b/plugins/mod_cron.lua @@ -45,6 +45,7 @@ local function should_run(when, last) return not last or last + periods[when] * local function run_task(task) local started_at = os.time(); task:run(started_at); + task.last = started_at; task:save(started_at); end diff --git a/teal-src/plugins/mod_cron.tl b/teal-src/plugins/mod_cron.tl index 1375a195..f3b8f62f 100644 --- a/teal-src/plugins/mod_cron.tl +++ b/teal-src/plugins/mod_cron.tl @@ -84,6 +84,7 @@ end local function run_task(task : task_spec) local started_at = os.time(); task:run(started_at); + task.last = started_at; task:save(started_at); end -- cgit v1.2.3