Software /
code /
prosody
Diff
teal-src/plugins/mod_cron.tl @ 12000:00c57684cf20
mod_cron: Follow convention of imports at the top
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Dec 2021 08:57:40 +0100 |
parent | 11995:bbd3ac65640d |
child | 12001:5a8c6f9a4583 |
line wrap: on
line diff
--- a/teal-src/plugins/mod_cron.tl Fri Dec 03 08:21:29 2021 +0100 +++ b/teal-src/plugins/mod_cron.tl Fri Dec 03 08:57:40 2021 +0100 @@ -1,6 +1,7 @@ module:set_global(); local async = require "util.async"; +local datetime = require "util.datetime"; local record map_store<K,V> -- TODO move to somewhere sensible @@ -53,7 +54,7 @@ end task.save = save_task; module:log("debug", "%s task %s added, last run %s", task.when, task.id, - task.last and require"util.datetime".datetime(task.last) or "never"); + task.last and datetime.datetime(task.last) or "never"); if task.last == nil and task.when == "daily" then -- initialize daily tasks to run at ~midnight UTC for now local now = os.time();