diff options
author | Kim Alvefur <zash@zash.se> | 2023-11-21 22:18:42 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-11-21 22:18:42 +0100 |
commit | b94a30ddcc0d0dad837aefab6f038d66dbb7bdb5 (patch) | |
tree | 4ff99c11cc0d2b83ee6a13081f93644a9782c062 | |
parent | 1e6027da6d9284a4a01149fc666fe6071fe82f4d (diff) | |
download | prosody-b94a30ddcc0d0dad837aefab6f038d66dbb7bdb5.tar.gz prosody-b94a30ddcc0d0dad837aefab6f038d66dbb7bdb5.zip |
mod_admin_shell: Fix lint [luacheck]
-rw-r--r-- | plugins/mod_admin_shell.lua | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 719f575b..d479a5a4 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -2017,18 +2017,11 @@ end 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 @@ function def_env.debug:async(runner_id) 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 @@ function def_env.debug:async(runner_id) 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; |