Software /
code /
prosody
Changeset
13588:899453f11f50
mod_cron: Don't run tasks if loaded inside prosodyctl
It's common for modules to depend on mod_cron, and this can lead to it loading
inside prosodyctl, where we don't really want to run any cron tasks.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Jan 2025 18:06:29 +0000 |
parents | 13587:fdb2e0568cf8 |
children | 13589:b1b931d5fee8 |
files | plugins/mod_cron.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_cron.lua Tue Jan 07 14:41:32 2025 +0000 +++ b/plugins/mod_cron.lua Tue Jan 07 18:06:29 2025 +0000 @@ -8,6 +8,10 @@ local active_hosts = {} +if prosody.process_type == "prosodyctl" then + return; -- Yes, it happens... +end + function module.add_host(host_module) local last_run_times = host_module:open_store("cron", "map");