Software /
code /
prosody
Changeset
13338:470ab6b55e93
mod_admin_shell: Fix lint [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Nov 2023 22:18:42 +0100 |
parents | 13337:5e258164d214 |
children | 13339:c94989c557cd |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Tue Nov 21 22:18:17 2023 +0100 +++ b/plugins/mod_admin_shell.lua Tue Nov 21 22:18:42 2023 +0100 @@ -2017,18 +2017,11 @@ function def_env.debug:async(runner_id) local print = self.session.print; - local async = require "prosody.util.async"; - local time_now = require "prosody.util.time".now(); - - local function format_time(t) - return os.date("%F %T", math.floor(normalize_time(t))); - end + local time_now = time.now(); if runner_id then - local matched; for runner, since in pairs(async.waiting_runners) do if runner.id == runner_id then - matched = runner; print("ID ", runner.id); local f = runner.func; if f == async.default_runner_func then @@ -2039,7 +2032,7 @@ print("Stanza:") print("\t"..runner.current_item:indent(2):pretty_print()); else - print("Work item", serialize(runner.current_item, "debug")); + print("Work item", self.session.serialize(runner.current_item, "debug")); end end @@ -2054,7 +2047,12 @@ return nil, "Runner not found or is currently idle"; end - local row = format_table({ { title = "ID", width = 12 }, { title = "Function", width = "10p" }, { title = "Status", width = "16" }, { title = "Location", width = "10p" } }, self.session.width); + local row = format_table({ + { title = "ID"; width = 12 }; + { title = "Function"; width = "10p" }; + { title = "Status"; width = "16" }; + { title = "Location"; width = "10p" }; + }, self.session.width); print(row()) local c = 0;